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:----sG78dEbLAnnSVIKuN9WSWzPh5qRhZLuH4ebdpRQUouAx9oyY4s3IS4qANtyJWFCB0ivz9uTl7VB/WdhMklbxIo62AcvZ/ZG1hVRWPzwEyUdcBBrkf8UYlHCS7ffByJC09gfDPUGP91yYk4xBRV1BRuXy1Pn45rK9ZoCVqnXzOQDjbuoj1G/um1iE6u25AX+iXmCRKq7ynqovXuuNbbHtyPF4Dk7Z9pZMpFv3g1+aNpwhmb34zwTRFxYKmSRWwRSx+l7rL5fNHGzxzZYtx4PryW/uyT1FMnMt4HsDBS6/M8IA2uyPrHy+W8EAJ1q6VZbGpuWTeBxG2gwSoLw3azA4qS9W0aX9jah81c8C8V6yIECindN4KPleFeCP6so747omDMHCgLz4/mZxlHaAh/lbphwXYoebPbXVoHU2vXz2mt+5TcW8mHqChwH33FgmlSgxcy3u2Zl2J0r2oR1ahxrd9Ztylu/PtpVxMRnm+sA0T/OIbv+VuNJ2d9sf8XPHnzOs3muL4PmzktUII4V3l+IupdO4v4pVf6jeLH7KuENjtpmmYYIxBrZ7BlG7mhjPTdEkk7gholdg8BCJ5+n7d+BCvboFLmO9scXEUGkWHqfSIE3H3ww9bjD/1kWtRF2xCV5ncLlPMuPP65b6ptxvXqE9iOC+5q24ewjeE5L8l9oGCFU=----ATTACHMENT:----MjY2MzQxNzU5NjI3NTc2IDUyMTYwOTUzODA4MTE4NDAgNTE0ODQ1ODc4MDA4OTcwMw==