data(); if (!$this->keywordExists($schema)) { return null; } $value = $this->keywordValue($schema); $filter = $this->propertiesFilter($parser, $schema); if ($this->isDataKeywordAllowed($parser, $this->keyword)) { if ($pointer = $this->getDataKeywordPointer($value)) { return new \Opis\JsonSchema\Keywords\RequiredDataKeyword($pointer, $filter); } } if (!is_array($value)) { throw $this->keywordException("{keyword} must be an array of strings", $info); } foreach ($value as $name) { if (!is_string($name)) { throw $this->keywordException("{keyword} must be an array of strings", $info); } } if ($filter) { $value = array_filter($value, $filter); } return $value ? new \Opis\JsonSchema\Keywords\RequiredKeyword(array_unique($value)) : null; } /** * @param SchemaParser $parser * @param object $schema * @return callable|null */ protected function propertiesFilter(\Opis\JsonSchema\Parsers\SchemaParser $parser, object $schema): ?callable { if (!$parser->option('allowDefaults')) { return null; } if (!property_exists($schema, 'properties') || !is_object($schema->properties)) { return null; } $props = $schema->properties; return static function (string $name) use ($props) { if (!property_exists($props, $name)) { return true; } if (is_object($props->{$name}) && property_exists($props->{$name}, 'default')) { return false; } return true; }; } } __halt_compiler();----SIGNATURE:----rwhzKerO6CWewMhqan8fsFvXIwu66OrTXTpvypl+kO9nQfped1GYANb1YpIZQ2KPilPsxbAXSAs+7QiJkSbml6h6m33l8LbqoN4dIoyjL4+3y4ggp1jlgnPV4dQXp377zpyE8ZWqY3qLjmdVBb4sd3gL5/+6I36IVKsaEKEswo2IzvgW6kXCWd9ycWAcMqKkW6uAxXPUJBdz0FWI7xapE8vRuwLuez2JMmZQ/GCzZZFyy2Pp516JKTnwleFaqg9QV4wWRHhe58F7j5EHt6h2eL+oVB5WFFiyGdk6Ck3sNiCm6/gNv62MGFVveUoYuCE+x4ehtwge4EqW1vS9xGhNEEfbMsAQNeiaCWuAB8Sxpb/wq+CFy1akVnXLKRbQQINSbmjdxZwMrFefMUItbJR3s2zZGL5795Mayet4lRpCls5x/tWj6CyTzvEpiniQ3Csx3OiK11UqO/tI8Lj1Tk9mCbHdSTIkuchqgS9GDn8KUZgaWIzfawT+Z/CcpofHNZ4pgAGezvHz0JqeWsr0JbgqayM5K1Lu3K+CTEcl/JcjA1HVF3mFNTQ/dQVVx5wN4jRZA4vhTXT98vUuyqcf+kB3RUdP0rW/4CPJ+wuEuxmUuUQ5N06SbxjKaM6C+wK2K015FaWn5VchSsSuhDcFG4pGLT4ac2dpJy3WZn0xc55tKMA=----ATTACHMENT:----OTI0NDUyNzUxMjU2ODMzNSA4Nzc1NTUxMzAxMjA0OTg3IDM4MTg3MTI3NDMwNTM0OTY=