src/Validators/NodeValidator.php
public function validate($subject): bool
    {
        foreach ($this->validatorMap as $validatorName => $validatorClass) {
            if (\array_key_exists($validatorName, $this->schema)) {
                /**
                 * @var ValidatorInterface $typeValidator
                 */
                $typeValidator = new $validatorClass($this->schema, $this->rootSchema);
                if (!$typeValidator->validate($subject)) {
                    return false;
                }
            }
        }
        return true;
    }
public function validate($subject): bool
    {
        foreach ($this->validatorMap as $validatorName => $validatorClass) {
            if (\array_key_exists($validatorName, $this->schema)) {
                /**
                 * @var ValidatorInterface $typeValidator
                 */
                $typeValidator = new $validatorClass($this->schema, $this->rootSchema);
                if (!$typeValidator->validate($subject)) {
                    return false;
                }
            }
        }
        return true;
    }
public function validate ( $ subject ) : bool { foreach ( $ this -> validatorMap as $ validatorName => $ validatorClass ) { if ( \ array_key_exists ( $ validatorName , $ this -> schema ) ) { /**
                 * @var ValidatorInterface $typeValidator
                 */ $ typeValidator = new $ validatorClass ( $ this -> schema , $ this -> rootSchema ) ; if ( ! $ typeValidator -> validate ( $ subject ) ) { return false ; } } } return true ; }
Single node validator chain

@param $subject
@return bool
Single node validator chain