public function canApply()
    {
        $nodeType = $this->getSubject()->getNodeType();
        $propertyName = $this->getPropertyName();
        $nodeTypeProperties = $nodeType->getProperties();

        if (!isset($nodeTypeProperties[$propertyName])) {
            return false;
        }

        if (isset($nodeTypeProperties[$propertyName]['validation'])) {
            foreach ($nodeTypeProperties[$propertyName]['validation'] as $validatorName => $validatorConfiguration) {
                if (!\is_array($validatorConfiguration)) {
                    $validatorConfiguration = [];
                }
                if ($this->nodePropertyValidationService->validate($this->value, $validatorName, $validatorConfiguration) === false) {
                    return false;
                }
            }
        }

        return true;
    }
public function canApply()
    {
        $nodeType = $this->getSubject()->getNodeType();
        $propertyName = $this->getPropertyName();
        $nodeTypeProperties = $nodeType->getProperties();

        if (!isset($nodeTypeProperties[$propertyName])) {
            return false;
        }

        if (isset($nodeTypeProperties[$propertyName]['validation'])) {
            foreach ($nodeTypeProperties[$propertyName]['validation'] as $validatorName => $validatorConfiguration) {
                if (!\is_array($validatorConfiguration)) {
                    $validatorConfiguration = [];
                }
                if ($this->nodePropertyValidationService->validate($this->value, $validatorName, $validatorConfiguration) === false) {
                    return false;
                }
            }
        }

        return true;
    }
public function canApply ( ) { $ nodeType = $ this -> getSubject ( ) -> getNodeType ( ) ; $ propertyName = $ this -> getPropertyName ( ) ; $ nodeTypeProperties = $ nodeType -> getProperties ( ) ; if ( ! isset ( $ nodeTypeProperties [ $ propertyName ] ) ) { return false ; } if ( isset ( $ nodeTypeProperties [ $ propertyName ] [ 'validation' ] ) ) { foreach ( $ nodeTypeProperties [ $ propertyName ] [ 'validation' ] as $ validatorName => $ validatorConfiguration ) { if ( ! \ is_array ( $ validatorConfiguration ) ) { $ validatorConfiguration = [ ] ; } if ( $ this -> nodePropertyValidationService -> validate ( $ this -> value , $ validatorName , $ validatorConfiguration ) === false ) { return false ; } } } return true ; }
Checks whether this change can be applied to the subject

@return boolean
Checks whether this change can be applied to the subject