minContains = $minContains; $this->maxContains = $maxContains; } /** * @inheritDoc */ public function type(): string { return self::TYPE_ARRAY; } /** * @inheritDoc */ public function parse(SchemaInfo $info, \Opis\JsonSchema\Parsers\SchemaParser $parser, object $shared): ?Keyword { $schema = $info->data(); if (!$this->keywordExists($schema)) { return null; } $value = $this->keywordValue($schema); if (!is_bool($value) && !is_object($value)) { throw $this->keywordException("{keyword} must be a json schema (object or boolean)", $info); } $min = $max = null; if ($this->minContains && $this->keywordExists($schema, $this->minContains)) { $min = $this->keywordValue($schema, $this->minContains); if (!is_int($min) || $min < 0) { throw $this->keywordException("{keyword} must be a non-negative integer", $info, $this->minContains); } } if ($this->maxContains && $this->keywordExists($schema, $this->maxContains)) { $max = $this->keywordValue($schema, $this->maxContains); if (!is_int($max) || $max < 0) { throw $this->keywordException("{keyword} must be a non-negative integer", $info, $this->maxContains); } if ($min !== null && $max < $min) { throw $this->keywordException("{keyword} must be greater than {$this->minContains}", $info, $this->maxContains); } } elseif ($min === 0) { return null; } return new ContainsKeyword($value, $min, $max); } } __halt_compiler();----SIGNATURE:----qWRRCt4c566tJhwNSPM+IKJS1t8aFkV79YJpyUHnrPF9vbn/4zpUImWu7kXuhZwpcoNdtgz9yBZdo6hX5gnh3y+SfxnuFEe0c29RcpVtxnzD2lgP/WT18sYi8FAkHYB7n4vv8T3WKarQiAuksAQNa1NQmkM0vMhN7Iehyvm7i1am0/0hb2nHARM0g59zzpIgEwO+zjbSDbJuEsrUYs/mOqbKFb3of4f9aHT3wbBU18Pmwm/9KeYkb23aD0+nu1ycSnBBHi+Z/QmsFDs72VmLV7vW3DUTvw7x/7inQJQ3MipG4EWs0YBBpKuDqAxVS/KFMoo6nkRZeenLGrmu9AGXOIvHbCFb5eEo6ciD1TdfaqLBgdFOTv2sbUTBY4AVaEuQbpmzH1EfGYHHmIGDoZORMDNU5SlO+tb9UW5M4EDka/jos4UiiStqNjaRAcJdaVMhNe/bIDZ2YcCAA2gK96ZG/YiyYBkinrKdnYJXfaNEnFbja//06E0E3AvHQ/7cfkuI7457GefujWIGjBMYbZln7m+FPaxO4aGYiLwIgpwRavm724O3dP2OiepHm3xfiyh6BamWw5OXVdqOkYMUYvC/oT/g2csb4cosXbamU3WvnD3bBAOEOM4nAQtIRgHtLwm1m1YY2WgS6aTMYhmMa3Mj6RsnNXQWtKfVj/Yk/3oThd4=----ATTACHMENT:----ODkyNjc2OTM1MzU5NzYzMyA5NTMyMDQzODkwODc3ODA1IDU1MzczOTQyNzAyMDEwNjk=