public function matchesPath(string $path): bool
    {
        $needle = $this->getAttribute(static::ATTR_PATH);

        return null === $needle || 0 === strpos($path, $needle);
    }
public function matchesPath(string $path): bool
    {
        $needle = $this->getAttribute(static::ATTR_PATH);

        return null === $needle || 0 === strpos($path, $needle);
    }
public function matchesPath ( string $ path ) : bool { $ needle = $ this -> getAttribute ( static :: ATTR_PATH ) ; return null === $ needle || 0 === strpos ( $ path , $ needle ) ; }
Returns true if the current cookie matches the supplied path.

@param string $path A path
Returns true if the current cookie matches the supplied path .