data(); if (!$this->keywordExists($schema)) { return null; } $value = $this->keywordValue($schema); if ($this->isDataKeywordAllowed($parser, $this->keyword)) { if ($pointer = $this->getDataKeywordPointer($value)) { return new \Opis\JsonSchema\Keywords\EnumDataKeyword($pointer); } } if (!is_array($value) || !$value) { throw $this->keywordException("{keyword} must be a non-empty array", $info); } $hasConst = property_exists($schema, 'const'); $constMatched = false; $allowedTypes = isset($shared->types) ? $shared->types : null; $foundTypes = []; $list = []; foreach ($value as $item) { $type = \Opis\JsonSchema\Helper::getJsonType($item); if ($type === null) { throw $this->keywordException("{keyword} contains invalid json data type", $info); } if ($allowedTypes && !\Opis\JsonSchema\Helper::jsonTypeMatches($type, $allowedTypes)) { continue; } if ($hasConst && \Opis\JsonSchema\Helper::equals($item, $schema->const)) { $constMatched = true; break; } if (!in_array($type, $foundTypes)) { $foundTypes[] = $type; } $list[] = $item; } if ($hasConst) { if ($constMatched) { return null; } throw $this->keywordException("{keyword} does not contain the value of const keyword", $info); } if ($foundTypes) { if ($allowedTypes === null) { $shared->types = $foundTypes; } else { $shared->types = array_unique(array_merge($shared->types, $foundTypes)); } } return new \Opis\JsonSchema\Keywords\EnumKeyword($list); } } __halt_compiler();----SIGNATURE:----l4wZrniMoMokIKqmuChC1g33CHv3kB5vcbE86Cqts8V7s3DYwBIwgBivRTUA2JPkfv8XFcDyZEiEiimPbDGqua9rp3U4RlrppSsX0G/eQYiCQBekiEPu5puwKt6lf5IMtu/A2dI/AAfBGTInZyZkVBDGFm38ESvgK5KMmiHFek4Na28cNBrhH1FwpIPvAkx5tKNdu2wj2nvpXwFlr0QujryOYxzGS3t68/O0NbC5w1BS4BFaxBE+2suGaKXr3HYoYifYC47QFb9LJ41XNptPj2xped46hpVQrafmBPz22oMCZtuiHm2S5xoEumkPaayPN1RJ95yNvXLcyauHOlbAAgu7KckyhUMhsH+5xgfhrAh77ybtcBWzAukqXxRi5pRErzX80erDIiNeTt64VCANIupxn7/B3Vis2zpCa/hOp7fwZ63PpDIFJlZGOq4QThy4+YyNIzT9srzDh72YSrhPG1FJEWcuclvf95W1vFGb5nYAjR3LlQ3RG5YLfbFCR6WqdFLW7KtEetj6LCfRVF2AYus4GxX/N2YKQQEqMFpodv/XbvWYpm3kidvrwp8PcVCXlpIAS267I7BVOdnPuSWyxyQrprRiOlLWKxeaWLWbmqQi4RZRu/NPGE7vdGWSIbI2cSSD8Z3bXJ/Q1G8afrM1tNlQGjhCaid82TnEYYf6sLE=----ATTACHMENT:----Njg3MjA1NDk1NTgxNTIyNCA0NDE1MDMyNzk4MTUzNjI1IDU1MTIyMTc5NzA1NjM2NDE=