Scalr\Tests\Functional\Api\V2\SpecSchema\Constraint\Validator::checkItems PHP Method

checkItems() protected method

Check each items in element
protected checkItems ( stdClass $element, AbstractSpecObject $schema )
$element stdClass the list of items
$schema Scalr\Tests\Functional\Api\V2\SpecSchema\DataTypes\AbstractSpecObject items schema generated of api specification
    protected function checkItems($element, $schema)
    {
        if (isset($schema->items)) {
            foreach ($element as $value) {
                $this->check($value, $schema->items);
            }
        } else {
            $this->checkRequired($element, $schema->entity);
            $this->checkObject((object) $element, $schema->entity);
        }
        $this->checkProperty($element, $schema);
    }