src/Validators/ArrayValidators/ItemsValidator.php
public function validate($subject): bool
    {
        if (\is_array($this->schema['items'])) {
            $schemaFirstKey = \array_keys($this->schema['items'])[0];
            $schemaType = \is_int($schemaFirstKey) ? 'array' : 'object';

            if (($schemaType === 'object') && !$this->validateItemsSchemaObject($subject, $this->schema)) {
                return false;
            }
            if ($schemaType === 'array' && !$this->validateItemsSchemaArray($subject, $this->schema)) {
                return false;
            }
        }
        return true;
    }
public function validate($subject): bool
    {
        if (\is_array($this->schema['items'])) {
            $schemaFirstKey = \array_keys($this->schema['items'])[0];
            $schemaType = \is_int($schemaFirstKey) ? 'array' : 'object';

            if (($schemaType === 'object') && !$this->validateItemsSchemaObject($subject, $this->schema)) {
                return false;
            }
            if ($schemaType === 'array' && !$this->validateItemsSchemaArray($subject, $this->schema)) {
                return false;
            }
        }
        return true;
    }
public function validate ( $ subject ) : bool { if ( \ is_array ( $ this -> schema [ 'items' ] ) ) { $ schemaFirstKey = \ array_keys ( $ this -> schema [ 'items' ] ) [ 0 ] ; $ schemaType = \ is_int ( $ schemaFirstKey ) ? 'array' : 'object' ; if ( ( $ schemaType === 'object' ) && ! $ this -> validateItemsSchemaObject ( $ subject , $ this -> schema ) ) { return false ; } if ( $ schemaType === 'array' && ! $ this -> validateItemsSchemaArray ( $ subject , $ this -> schema ) ) { return false ; } } return true ; }
Validates subject against items

@param $subject
@return bool
Validates subject against items