public function isPrefix($propertyPath)
    {
        $length = \strlen($propertyPath);
        $prefix = substr($this->propertyPath, 0, $length);
        $next = isset($this->propertyPath[$length]) ? $this->propertyPath[$length] : null;

        return $prefix === $propertyPath && ('[' === $next || '.' === $next);
    }
public function isPrefix($propertyPath)
    {
        $length = \strlen($propertyPath);
        $prefix = substr($this->propertyPath, 0, $length);
        $next = isset($this->propertyPath[$length]) ? $this->propertyPath[$length] : null;

        return $prefix === $propertyPath && ('[' === $next || '.' === $next);
    }
public function isPrefix ( $ propertyPath ) { $ length = \ strlen ( $ propertyPath ) ; $ prefix = substr ( $ this -> propertyPath , 0 , $ length ) ; $ next = isset ( $ this -> propertyPath [ $ length ] ) ? $ this -> propertyPath [ $ length ] : null ; return $ prefix === $ propertyPath && ( '[' === $ next || '.' === $ next ) ; }
Matches a property path against a prefix of the rule path.

@param string $propertyPath The property path to match against the rule

@return bool Whether the property path is a prefix of the rule or not
Matches a property path against a prefix of the rule path .