protected function shouldSkip($object, $propertyPath)
    {
        if (!\is_object($object) && !\is_array($object)) {
            return false;
        }

        if (!empty($propertyPath)) {
            $parts = \explode('.', $propertyPath);
            $accessor = new PropertyAccessor();
            $parent = $object;
            foreach ($parts as $childSubPath) {
                if ($parent instanceof EntityInterface && $this->shouldSkipObjectProperty($parent, $childSubPath)) {
                    return true;
                }

                if ($accessor->isReadable($parent, $childSubPath)) {
                    $parent = $accessor->getValue($parent, $childSubPath);
                } else {
                    return false;
                }
            }
        }

        return false;
    }
protected function shouldSkip($object, $propertyPath)
    {
        if (!\is_object($object) && !\is_array($object)) {
            return false;
        }

        if (!empty($propertyPath)) {
            $parts = \explode('.', $propertyPath);
            $accessor = new PropertyAccessor();
            $parent = $object;
            foreach ($parts as $childSubPath) {
                if ($parent instanceof EntityInterface && $this->shouldSkipObjectProperty($parent, $childSubPath)) {
                    return true;
                }

                if ($accessor->isReadable($parent, $childSubPath)) {
                    $parent = $accessor->getValue($parent, $childSubPath);
                } else {
                    return false;
                }
            }
        }

        return false;
    }
protected function shouldSkip ( $ object , $ propertyPath ) { if ( ! \ is_object ( $ object ) && ! \ is_array ( $ object ) ) { return false ; } if ( ! empty ( $ propertyPath ) ) { $ parts = \ explode ( '.' , $ propertyPath ) ; $ accessor = new PropertyAccessor ( ) ; $ parent = $ object ; foreach ( $ parts as $ childSubPath ) { if ( $ parent instanceof EntityInterface && $ this -> shouldSkipObjectProperty ( $ parent , $ childSubPath ) ) { return true ; } if ( $ accessor -> isReadable ( $ parent , $ childSubPath ) ) { $ parent = $ accessor -> getValue ( $ parent , $ childSubPath ) ; } else { return false ; } } } return false ; }
Returns true if a property of a given object should be ignored in the validation.

@param $object
@param $propertyPath

@return bool
Returns true if a property of a given object should be ignored in the validation .