@@ -295,7 +295,7 @@ public function withDomain($domain)
295295 public function matchDomain ($ domain )
296296 {
297297 // Domain is not set or exact match
298- if (!$ this ->hasDomain () || strcasecmp ($ domain , $ this ->domain ) === 0 ) {
298+ if (!$ this ->hasDomain () || 0 === strcasecmp ($ domain , $ this ->domain )) {
299299 return true ;
300300 }
301301
@@ -343,7 +343,7 @@ public function withPath($path)
343343 */
344344 public function matchPath ($ path )
345345 {
346- return $ this ->path === $ path || (strpos ($ path , rtrim ($ this ->path , '/ ' ).'/ ' ) === 0 );
346+ return $ this ->path === $ path || (0 === strpos ($ path , rtrim ($ this ->path , '/ ' ).'/ ' ));
347347 }
348348
349349 /**
@@ -405,7 +405,7 @@ public function withHttpOnly($httpOnly)
405405 *
406406 * @return bool
407407 */
408- public function match (Cookie $ cookie )
408+ public function match (self $ cookie )
409409 {
410410 return $ this ->name === $ cookie ->name && $ this ->domain === $ cookie ->domain and $ this ->path === $ cookie ->path ;
411411 }
@@ -517,7 +517,7 @@ private function normalizePath($path)
517517 {
518518 $ path = rtrim ($ path , '/ ' );
519519
520- if (empty ($ path ) or substr ($ path , 0 , 1 ) !== ' / ' ) {
520+ if (empty ($ path ) or ' / ' !== substr ($ path , 0 , 1 )) {
521521 $ path = '/ ' ;
522522 }
523523
0 commit comments