diff --git a/bin/validate-json b/bin/validate-json index 83f0e2a8..2bad7672 100755 --- a/bin/validate-json +++ b/bin/validate-json @@ -92,11 +92,10 @@ function getUrlFromPath($path) /** * Take a HTTP header value and split it up into parts. * - * @param $headerValue * @return array Key "_value" contains the main value, all others * as given in the header value */ -function parseHeaderValue($headerValue) +function parseHeaderValue($headerValue): array { if (strpos($headerValue, ';') === false) { return ['_value' => $headerValue]; diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index d4116654..535cbdd7 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -35,26 +35,71 @@ parameters: count: 3 path: src/JsonSchema/Constraints/CollectionConstraint.php + - + message: "#^Cannot access property \\$items on mixed\\.$#" + count: 1 + path: src/JsonSchema/Constraints/CollectionConstraint.php + - message: "#^Cannot access property \\$items on stdClass\\|null\\.$#" count: 6 path: src/JsonSchema/Constraints/CollectionConstraint.php + - + message: "#^Cannot access property \\$maxItems on mixed\\.$#" + count: 1 + path: src/JsonSchema/Constraints/CollectionConstraint.php + + - + message: "#^Cannot access property \\$minItems on mixed\\.$#" + count: 1 + path: src/JsonSchema/Constraints/CollectionConstraint.php + + - + message: "#^Cannot access property \\$uniqueItems on mixed\\.$#" + count: 1 + path: src/JsonSchema/Constraints/CollectionConstraint.php + - message: "#^Method JsonSchema\\\\Constraints\\\\CollectionConstraint\\:\\:validateItems\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" count: 1 path: src/JsonSchema/Constraints/CollectionConstraint.php + - + message: "#^Parameter \\#1 \\$array of function array_unique expects array, mixed given\\.$#" + count: 1 + path: src/JsonSchema/Constraints/CollectionConstraint.php + - message: "#^Parameter \\#1 \\$object_or_class of function property_exists expects object\\|string, stdClass\\|null given\\.$#" count: 1 path: src/JsonSchema/Constraints/CollectionConstraint.php + - + message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#" + count: 3 + path: src/JsonSchema/Constraints/CollectionConstraint.php + - message: "#^Parameter \\#2 \\$schema of method JsonSchema\\\\Constraints\\\\CollectionConstraint\\:\\:validateItems\\(\\) expects stdClass\\|null, object given\\.$#" count: 1 path: src/JsonSchema/Constraints/CollectionConstraint.php + - + message: "#^Parameter \\#4 \\$i of method JsonSchema\\\\Constraints\\\\CollectionConstraint\\:\\:validateItems\\(\\) expects string\\|null, mixed given\\.$#" + count: 1 + path: src/JsonSchema/Constraints/CollectionConstraint.php + + - + message: "#^Cannot access property \\$const on mixed\\.$#" + count: 2 + path: src/JsonSchema/Constraints/ConstConstraint.php + + - + message: "#^Cannot access property \\$required on mixed\\.$#" + count: 1 + path: src/JsonSchema/Constraints/ConstConstraint.php + - message: "#^Method JsonSchema\\\\Constraints\\\\Constraint\\:\\:checkObject\\(\\) has parameter \\$appliedDefaults with no type specified\\.$#" count: 1 @@ -86,9 +131,14 @@ parameters: path: src/JsonSchema/Constraints/ConstraintInterface.php - - message: "#^PHPDoc tag @throws with type JsonSchema\\\\Exception\\\\ExceptionInterface is not subtype of Throwable$#" + message: "#^Cannot access property \\$enum on mixed\\.$#" + count: 2 + path: src/JsonSchema/Constraints/EnumConstraint.php + + - + message: "#^Cannot access property \\$required on mixed\\.$#" count: 1 - path: src/JsonSchema/Constraints/ConstraintInterface.php + path: src/JsonSchema/Constraints/EnumConstraint.php - message: "#^Method JsonSchema\\\\Constraints\\\\Factory\\:\\:createInstanceFor\\(\\) should return JsonSchema\\\\Constraints\\\\BaseConstraint&JsonSchema\\\\Constraints\\\\ConstraintInterface but returns object\\.$#" @@ -126,7 +176,7 @@ parameters: path: src/JsonSchema/Constraints/Factory.php - - message: "#^Method JsonSchema\\\\Constraints\\\\FormatConstraint\\:\\:validateColor\\(\\) has no return type specified\\.$#" + message: "#^Cannot access property \\$format on mixed\\.$#" count: 1 path: src/JsonSchema/Constraints/FormatConstraint.php @@ -136,62 +186,62 @@ parameters: path: src/JsonSchema/Constraints/FormatConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\FormatConstraint\\:\\:validateDateTime\\(\\) has no return type specified\\.$#" + message: "#^Method JsonSchema\\\\Constraints\\\\FormatConstraint\\:\\:validateDateTime\\(\\) has parameter \\$datetime with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/FormatConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\FormatConstraint\\:\\:validateDateTime\\(\\) has parameter \\$datetime with no type specified\\.$#" + message: "#^Method JsonSchema\\\\Constraints\\\\FormatConstraint\\:\\:validateDateTime\\(\\) has parameter \\$format with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/FormatConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\FormatConstraint\\:\\:validateDateTime\\(\\) has parameter \\$format with no type specified\\.$#" + message: "#^Method JsonSchema\\\\Constraints\\\\FormatConstraint\\:\\:validateHostname\\(\\) has parameter \\$host with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/FormatConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\FormatConstraint\\:\\:validateHostname\\(\\) has no return type specified\\.$#" + message: "#^Method JsonSchema\\\\Constraints\\\\FormatConstraint\\:\\:validatePhone\\(\\) has parameter \\$phone with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/FormatConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\FormatConstraint\\:\\:validateHostname\\(\\) has parameter \\$host with no type specified\\.$#" + message: "#^Method JsonSchema\\\\Constraints\\\\FormatConstraint\\:\\:validateRegex\\(\\) has parameter \\$regex with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/FormatConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\FormatConstraint\\:\\:validatePhone\\(\\) has no return type specified\\.$#" + message: "#^Method JsonSchema\\\\Constraints\\\\FormatConstraint\\:\\:validateStyle\\(\\) has parameter \\$style with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/FormatConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\FormatConstraint\\:\\:validatePhone\\(\\) has parameter \\$phone with no type specified\\.$#" + message: "#^Cannot access property \\$divisibleBy on mixed\\.$#" count: 1 - path: src/JsonSchema/Constraints/FormatConstraint.php + path: src/JsonSchema/Constraints/NumberConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\FormatConstraint\\:\\:validateRegex\\(\\) has no return type specified\\.$#" + message: "#^Cannot access property \\$exclusiveMaximum on mixed\\.$#" count: 1 - path: src/JsonSchema/Constraints/FormatConstraint.php + path: src/JsonSchema/Constraints/NumberConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\FormatConstraint\\:\\:validateRegex\\(\\) has parameter \\$regex with no type specified\\.$#" + message: "#^Cannot access property \\$exclusiveMinimum on mixed\\.$#" count: 1 - path: src/JsonSchema/Constraints/FormatConstraint.php + path: src/JsonSchema/Constraints/NumberConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\FormatConstraint\\:\\:validateStyle\\(\\) has no return type specified\\.$#" + message: "#^Cannot access property \\$maximum on mixed\\.$#" count: 1 - path: src/JsonSchema/Constraints/FormatConstraint.php + path: src/JsonSchema/Constraints/NumberConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\FormatConstraint\\:\\:validateStyle\\(\\) has parameter \\$style with no type specified\\.$#" + message: "#^Cannot access property \\$minimum on mixed\\.$#" count: 1 - path: src/JsonSchema/Constraints/FormatConstraint.php + path: src/JsonSchema/Constraints/NumberConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\NumberConstraint\\:\\:fmod\\(\\) has no return type specified\\.$#" + message: "#^Cannot access property \\$multipleOf on mixed\\.$#" count: 1 path: src/JsonSchema/Constraints/NumberConstraint.php @@ -231,42 +281,42 @@ parameters: path: src/JsonSchema/Constraints/ObjectConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\ObjectConstraint\\:\\:validateElement\\(\\) has no return type specified\\.$#" + message: "#^Method JsonSchema\\\\Constraints\\\\ObjectConstraint\\:\\:validateElement\\(\\) has parameter \\$matches with no value type specified in iterable type array\\.$#" count: 1 path: src/JsonSchema/Constraints/ObjectConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\ObjectConstraint\\:\\:validateElement\\(\\) has parameter \\$matches with no value type specified in iterable type array\\.$#" + message: "#^Method JsonSchema\\\\Constraints\\\\ObjectConstraint\\:\\:validatePatternProperties\\(\\) has parameter \\$element with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/ObjectConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\ObjectConstraint\\:\\:validateMinMaxConstraint\\(\\) has no return type specified\\.$#" + message: "#^Method JsonSchema\\\\Constraints\\\\ObjectConstraint\\:\\:validatePatternProperties\\(\\) has parameter \\$patternProperties with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/ObjectConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\ObjectConstraint\\:\\:validatePatternProperties\\(\\) has no return type specified\\.$#" + message: "#^Parameter \\#2 \\$objectDefinition of method JsonSchema\\\\Constraints\\\\ObjectConstraint\\:\\:validateMinMaxConstraint\\(\\) expects stdClass, stdClass\\|null given\\.$#" count: 1 path: src/JsonSchema/Constraints/ObjectConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\ObjectConstraint\\:\\:validatePatternProperties\\(\\) has parameter \\$element with no type specified\\.$#" + message: "#^Parameter \\#2 \\$properties of method JsonSchema\\\\Constraints\\\\ObjectConstraint\\:\\:validateProperties\\(\\) expects stdClass\\|null, mixed given\\.$#" count: 1 path: src/JsonSchema/Constraints/ObjectConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\ObjectConstraint\\:\\:validatePatternProperties\\(\\) has parameter \\$patternProperties with no type specified\\.$#" + message: "#^Parameter \\#2 \\$property of method JsonSchema\\\\Constraints\\\\ObjectConstraint\\:\\:getProperty\\(\\) expects string, mixed given\\.$#" count: 1 path: src/JsonSchema/Constraints/ObjectConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\ObjectConstraint\\:\\:validateProperties\\(\\) has no return type specified\\.$#" + message: "#^Parameter \\#3 \\$schema of method JsonSchema\\\\Constraints\\\\ObjectConstraint\\:\\:validateElement\\(\\) expects stdClass\\|null, mixed given\\.$#" count: 1 path: src/JsonSchema/Constraints/ObjectConstraint.php - - message: "#^Parameter \\#2 \\$objectDefinition of method JsonSchema\\\\Constraints\\\\ObjectConstraint\\:\\:validateMinMaxConstraint\\(\\) expects stdClass, stdClass\\|null given\\.$#" + message: "#^Parameter \\#5 \\$properties of method JsonSchema\\\\Constraints\\\\ObjectConstraint\\:\\:validateElement\\(\\) expects stdClass\\|null, mixed given\\.$#" count: 1 path: src/JsonSchema/Constraints/ObjectConstraint.php @@ -276,57 +326,57 @@ parameters: path: src/JsonSchema/Constraints/ObjectConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\StringConstraint\\:\\:strlen\\(\\) has no return type specified\\.$#" + message: "#^Parameter \\#1 \\$id of method JsonSchema\\\\SchemaStorageInterface\\:\\:getSchema\\(\\) expects string, mixed given\\.$#" count: 1 - path: src/JsonSchema/Constraints/StringConstraint.php + path: src/JsonSchema/Constraints/SchemaConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\StringConstraint\\:\\:strlen\\(\\) has parameter \\$string with no type specified\\.$#" + message: "#^Cannot access property \\$maxLength on mixed\\.$#" count: 1 path: src/JsonSchema/Constraints/StringConstraint.php - - message: "#^Parameter \\#2 \\$encoding of function mb_strlen expects string, string\\|false given\\.$#" + message: "#^Cannot access property \\$minLength on mixed\\.$#" count: 1 path: src/JsonSchema/Constraints/StringConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\LooseTypeCheck\\:\\:isArray\\(\\) has no return type specified\\.$#" + message: "#^Cannot access property \\$pattern on mixed\\.$#" count: 1 - path: src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php + path: src/JsonSchema/Constraints/StringConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\LooseTypeCheck\\:\\:isArray\\(\\) has parameter \\$value with no type specified\\.$#" + message: "#^Method JsonSchema\\\\Constraints\\\\StringConstraint\\:\\:strlen\\(\\) has parameter \\$string with no type specified\\.$#" count: 1 - path: src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php + path: src/JsonSchema/Constraints/StringConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\LooseTypeCheck\\:\\:isAssociativeArray\\(\\) has parameter \\$arr with no value type specified in iterable type array\\.$#" + message: "#^Parameter \\#2 \\$encoding of function mb_strlen expects string, string\\|false given\\.$#" count: 1 - path: src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php + path: src/JsonSchema/Constraints/StringConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\LooseTypeCheck\\:\\:isObject\\(\\) has no return type specified\\.$#" + message: "#^Parameter \\#2 \\$subject of function preg_match expects string, mixed given\\.$#" count: 1 - path: src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php + path: src/JsonSchema/Constraints/StringConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\LooseTypeCheck\\:\\:isObject\\(\\) has parameter \\$value with no type specified\\.$#" + message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\LooseTypeCheck\\:\\:isArray\\(\\) has parameter \\$value with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\LooseTypeCheck\\:\\:propertyCount\\(\\) has no return type specified\\.$#" + message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\LooseTypeCheck\\:\\:isAssociativeArray\\(\\) has parameter \\$arr with no value type specified in iterable type array\\.$#" count: 1 path: src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\LooseTypeCheck\\:\\:propertyCount\\(\\) has parameter \\$value with no type specified\\.$#" + message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\LooseTypeCheck\\:\\:isObject\\(\\) has parameter \\$value with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\LooseTypeCheck\\:\\:propertyExists\\(\\) has no return type specified\\.$#" + message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\LooseTypeCheck\\:\\:propertyCount\\(\\) has parameter \\$value with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php @@ -340,11 +390,6 @@ parameters: count: 1 path: src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php - - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\LooseTypeCheck\\:\\:propertyGet\\(\\) has no return type specified\\.$#" - count: 1 - path: src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\LooseTypeCheck\\:\\:propertyGet\\(\\) has parameter \\$property with no type specified\\.$#" count: 1 @@ -355,11 +400,6 @@ parameters: count: 1 path: src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php - - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\LooseTypeCheck\\:\\:propertySet\\(\\) has no return type specified\\.$#" - count: 1 - path: src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\LooseTypeCheck\\:\\:propertySet\\(\\) has parameter \\$data with no type specified\\.$#" count: 1 @@ -375,41 +415,21 @@ parameters: count: 1 path: src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php - - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\StrictTypeCheck\\:\\:isArray\\(\\) has no return type specified\\.$#" - count: 1 - path: src/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\StrictTypeCheck\\:\\:isArray\\(\\) has parameter \\$value with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php - - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\StrictTypeCheck\\:\\:isObject\\(\\) has no return type specified\\.$#" - count: 1 - path: src/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\StrictTypeCheck\\:\\:isObject\\(\\) has parameter \\$value with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php - - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\StrictTypeCheck\\:\\:propertyCount\\(\\) has no return type specified\\.$#" - count: 1 - path: src/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\StrictTypeCheck\\:\\:propertyCount\\(\\) has parameter \\$value with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php - - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\StrictTypeCheck\\:\\:propertyExists\\(\\) has no return type specified\\.$#" - count: 1 - path: src/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\StrictTypeCheck\\:\\:propertyExists\\(\\) has parameter \\$property with no type specified\\.$#" count: 1 @@ -420,11 +440,6 @@ parameters: count: 1 path: src/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php - - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\StrictTypeCheck\\:\\:propertyGet\\(\\) has no return type specified\\.$#" - count: 1 - path: src/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\StrictTypeCheck\\:\\:propertyGet\\(\\) has parameter \\$property with no type specified\\.$#" count: 1 @@ -435,11 +450,6 @@ parameters: count: 1 path: src/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php - - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\StrictTypeCheck\\:\\:propertySet\\(\\) has no return type specified\\.$#" - count: 1 - path: src/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\StrictTypeCheck\\:\\:propertySet\\(\\) has parameter \\$data with no type specified\\.$#" count: 1 @@ -455,41 +465,21 @@ parameters: count: 1 path: src/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php - - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\TypeCheckInterface\\:\\:isArray\\(\\) has no return type specified\\.$#" - count: 1 - path: src/JsonSchema/Constraints/TypeCheck/TypeCheckInterface.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\TypeCheckInterface\\:\\:isArray\\(\\) has parameter \\$value with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/TypeCheck/TypeCheckInterface.php - - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\TypeCheckInterface\\:\\:isObject\\(\\) has no return type specified\\.$#" - count: 1 - path: src/JsonSchema/Constraints/TypeCheck/TypeCheckInterface.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\TypeCheckInterface\\:\\:isObject\\(\\) has parameter \\$value with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/TypeCheck/TypeCheckInterface.php - - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\TypeCheckInterface\\:\\:propertyCount\\(\\) has no return type specified\\.$#" - count: 1 - path: src/JsonSchema/Constraints/TypeCheck/TypeCheckInterface.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\TypeCheckInterface\\:\\:propertyCount\\(\\) has parameter \\$value with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/TypeCheck/TypeCheckInterface.php - - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\TypeCheckInterface\\:\\:propertyExists\\(\\) has no return type specified\\.$#" - count: 1 - path: src/JsonSchema/Constraints/TypeCheck/TypeCheckInterface.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\TypeCheckInterface\\:\\:propertyExists\\(\\) has parameter \\$property with no type specified\\.$#" count: 1 @@ -500,11 +490,6 @@ parameters: count: 1 path: src/JsonSchema/Constraints/TypeCheck/TypeCheckInterface.php - - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\TypeCheckInterface\\:\\:propertyGet\\(\\) has no return type specified\\.$#" - count: 1 - path: src/JsonSchema/Constraints/TypeCheck/TypeCheckInterface.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\TypeCheckInterface\\:\\:propertyGet\\(\\) has parameter \\$property with no type specified\\.$#" count: 1 @@ -515,11 +500,6 @@ parameters: count: 1 path: src/JsonSchema/Constraints/TypeCheck/TypeCheckInterface.php - - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\TypeCheckInterface\\:\\:propertySet\\(\\) has no return type specified\\.$#" - count: 1 - path: src/JsonSchema/Constraints/TypeCheck/TypeCheckInterface.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeCheck\\\\TypeCheckInterface\\:\\:propertySet\\(\\) has parameter \\$data with no type specified\\.$#" count: 1 @@ -536,22 +516,17 @@ parameters: path: src/JsonSchema/Constraints/TypeCheck/TypeCheckInterface.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeConstraint\\:\\:implodeWith\\(\\) has parameter \\$elements with no value type specified in iterable type array\\.$#" - count: 1 - path: src/JsonSchema/Constraints/TypeConstraint.php - - - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeConstraint\\:\\:validateType\\(\\) has parameter \\$coerce with no type specified\\.$#" + message: "#^Cannot access property \\$type on mixed\\.$#" count: 1 path: src/JsonSchema/Constraints/TypeConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeConstraint\\:\\:validateTypeNameWording\\(\\) has no return type specified\\.$#" + message: "#^Method JsonSchema\\\\Constraints\\\\TypeConstraint\\:\\:implodeWith\\(\\) has parameter \\$elements with no value type specified in iterable type array\\.$#" count: 1 path: src/JsonSchema/Constraints/TypeConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\TypeConstraint\\:\\:validateTypesArray\\(\\) has no return type specified\\.$#" + message: "#^Method JsonSchema\\\\Constraints\\\\TypeConstraint\\:\\:validateType\\(\\) has parameter \\$coerce with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/TypeConstraint.php @@ -570,6 +545,16 @@ parameters: count: 2 path: src/JsonSchema/Constraints/TypeConstraint.php + - + message: "#^Parameter \\#1 \\$array of function reset expects array\\|object, mixed given\\.$#" + count: 4 + path: src/JsonSchema/Constraints/TypeConstraint.php + + - + message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#" + count: 4 + path: src/JsonSchema/Constraints/TypeConstraint.php + - message: "#^Parameter \\#3 \\$listEnd of method JsonSchema\\\\Constraints\\\\TypeConstraint\\:\\:implodeWith\\(\\) expects bool, string given\\.$#" count: 1 @@ -581,37 +566,102 @@ parameters: path: src/JsonSchema/Constraints/TypeConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\UndefinedConstraint\\:\\:check\\(\\) has parameter \\$fromDefault with no type specified\\.$#" + message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#" count: 1 path: src/JsonSchema/Constraints/UndefinedConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\UndefinedConstraint\\:\\:shouldApplyDefaultValue\\(\\) has parameter \\$name with no type specified\\.$#" + message: "#^Cannot access offset mixed on mixed\\.$#" + count: 2 + path: src/JsonSchema/Constraints/UndefinedConstraint.php + + - + message: "#^Cannot access property \\$additionalProperties on mixed\\.$#" + count: 1 + path: src/JsonSchema/Constraints/UndefinedConstraint.php + + - + message: "#^Cannot access property \\$allOf on mixed\\.$#" + count: 1 + path: src/JsonSchema/Constraints/UndefinedConstraint.php + + - + message: "#^Cannot access property \\$anyOf on mixed\\.$#" + count: 1 + path: src/JsonSchema/Constraints/UndefinedConstraint.php + + - + message: "#^Cannot access property \\$const on mixed\\.$#" + count: 1 + path: src/JsonSchema/Constraints/UndefinedConstraint.php + + - + message: "#^Cannot access property \\$default on mixed\\.$#" + count: 3 + path: src/JsonSchema/Constraints/UndefinedConstraint.php + + - + message: "#^Cannot access property \\$default on object\\|string\\|null\\.$#" + count: 6 + path: src/JsonSchema/Constraints/UndefinedConstraint.php + + - + message: "#^Cannot access property \\$dependencies on mixed\\.$#" + count: 1 + path: src/JsonSchema/Constraints/UndefinedConstraint.php + + - + message: "#^Cannot access property \\$disallow on mixed\\.$#" + count: 1 + path: src/JsonSchema/Constraints/UndefinedConstraint.php + + - + message: "#^Cannot access property \\$enum on mixed\\.$#" + count: 1 + path: src/JsonSchema/Constraints/UndefinedConstraint.php + + - + message: "#^Cannot access property \\$extends on mixed\\.$#" + count: 1 + path: src/JsonSchema/Constraints/UndefinedConstraint.php + + - + message: "#^Cannot access property \\$items on mixed\\.$#" count: 1 path: src/JsonSchema/Constraints/UndefinedConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\UndefinedConstraint\\:\\:validateCommonProperties\\(\\) has no return type specified\\.$#" + message: "#^Cannot access property \\$not on mixed\\.$#" count: 1 path: src/JsonSchema/Constraints/UndefinedConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\UndefinedConstraint\\:\\:validateDependencies\\(\\) has no return type specified\\.$#" + message: "#^Cannot access property \\$oneOf on mixed\\.$#" count: 1 path: src/JsonSchema/Constraints/UndefinedConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\UndefinedConstraint\\:\\:validateOfProperties\\(\\) has no return type specified\\.$#" + message: "#^Cannot access property \\$patternProperties on mixed\\.$#" count: 1 path: src/JsonSchema/Constraints/UndefinedConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\UndefinedConstraint\\:\\:validateTypes\\(\\) has no return type specified\\.$#" + message: "#^Cannot access property \\$properties on mixed\\.$#" + count: 2 + path: src/JsonSchema/Constraints/UndefinedConstraint.php + + - + message: "#^Cannot access property \\$required on mixed\\.$#" + count: 4 + path: src/JsonSchema/Constraints/UndefinedConstraint.php + + - + message: "#^Method JsonSchema\\\\Constraints\\\\UndefinedConstraint\\:\\:check\\(\\) has parameter \\$fromDefault with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/UndefinedConstraint.php - - message: "#^Method JsonSchema\\\\Constraints\\\\UndefinedConstraint\\:\\:validateUri\\(\\) has no return type specified\\.$#" + message: "#^Method JsonSchema\\\\Constraints\\\\UndefinedConstraint\\:\\:shouldApplyDefaultValue\\(\\) has parameter \\$name with no type specified\\.$#" count: 1 path: src/JsonSchema/Constraints/UndefinedConstraint.php @@ -626,17 +676,42 @@ parameters: path: src/JsonSchema/Constraints/UndefinedConstraint.php - - message: "#^Property JsonSchema\\\\Constraints\\\\UndefinedConstraint\\:\\:\\$appliedDefaults type has no value type specified in iterable type array\\.$#" + message: "#^Parameter \\#1 \\$object_or_class of function property_exists expects object\\|string, mixed given\\.$#" count: 1 path: src/JsonSchema/Constraints/UndefinedConstraint.php - - message: "#^Method JsonSchema\\\\Entity\\\\JsonPointer\\:\\:encodePropertyPaths\\(\\) return type has no value type specified in iterable type array\\.$#" + message: "#^Parameter \\#1 \\$object_or_class of function property_exists expects object\\|string, object\\|string\\|null given\\.$#" + count: 2 + path: src/JsonSchema/Constraints/UndefinedConstraint.php + + - + message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#" + count: 3 + path: src/JsonSchema/Constraints/UndefinedConstraint.php + + - + message: "#^Parameter \\#2 \\$search of function array_key_exists expects array, mixed given\\.$#" count: 1 - path: src/JsonSchema/Entity/JsonPointer.php + path: src/JsonSchema/Constraints/UndefinedConstraint.php + + - + message: "#^Parameter \\#4 \\$i of method JsonSchema\\\\Constraints\\\\UndefinedConstraint\\:\\:validateCommonProperties\\(\\) expects string, mixed given\\.$#" + count: 1 + path: src/JsonSchema/Constraints/UndefinedConstraint.php + + - + message: "#^Parameter \\#4 \\$i of method JsonSchema\\\\Constraints\\\\UndefinedConstraint\\:\\:validateTypes\\(\\) expects string\\|null, mixed given\\.$#" + count: 1 + path: src/JsonSchema/Constraints/UndefinedConstraint.php + + - + message: "#^Property JsonSchema\\\\Constraints\\\\UndefinedConstraint\\:\\:\\$appliedDefaults type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/JsonSchema/Constraints/UndefinedConstraint.php - - message: "#^Method JsonSchema\\\\Entity\\\\JsonPointer\\:\\:setFromDefault\\(\\) has no return type specified\\.$#" + message: "#^Method JsonSchema\\\\Entity\\\\JsonPointer\\:\\:encodePropertyPaths\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 path: src/JsonSchema/Entity/JsonPointer.php @@ -671,7 +746,7 @@ parameters: path: src/JsonSchema/Iterator/ObjectIterator.php - - message: "#^Method JsonSchema\\\\Iterator\\\\ObjectIterator\\:\\:initialize\\(\\) has no return type specified\\.$#" + message: "#^Parameter \\#1 \\$item of method JsonSchema\\\\Iterator\\\\ObjectIterator\\:\\:getDataFromItem\\(\\) expects array\\|object, mixed given\\.$#" count: 1 path: src/JsonSchema/Iterator/ObjectIterator.php @@ -706,27 +781,32 @@ parameters: path: src/JsonSchema/SchemaStorage.php - - message: "#^Call to function is_array\\(\\) with object will always evaluate to false\\.$#" + message: "#^Call to function is_array\\(\\) with object\\|string\\|false\\|null will always evaluate to false\\.$#" count: 1 path: src/JsonSchema/SchemaStorage.php - - message: "#^Method JsonSchema\\\\SchemaStorage\\:\\:addSchema\\(\\) has no return type specified\\.$#" + message: "#^Method JsonSchema\\\\SchemaStorage\\:\\:resolveRef\\(\\) has parameter \\$resolveStack with no type specified\\.$#" count: 1 path: src/JsonSchema/SchemaStorage.php - - message: "#^Method JsonSchema\\\\SchemaStorage\\:\\:expandRefs\\(\\) has no return type specified\\.$#" + message: "#^Method JsonSchema\\\\SchemaStorage\\:\\:resolveRef\\(\\) should return object\\|false but returns object\\|string\\|false\\|null\\.$#" count: 1 path: src/JsonSchema/SchemaStorage.php - - message: "#^Method JsonSchema\\\\SchemaStorage\\:\\:resolveRef\\(\\) has parameter \\$resolveStack with no type specified\\.$#" + message: "#^Method JsonSchema\\\\SchemaStorage\\:\\:resolveRefSchema\\(\\) has parameter \\$resolveStack with no type specified\\.$#" count: 1 path: src/JsonSchema/SchemaStorage.php - - message: "#^Method JsonSchema\\\\SchemaStorage\\:\\:resolveRefSchema\\(\\) has parameter \\$resolveStack with no type specified\\.$#" + message: "#^Method JsonSchema\\\\SchemaStorage\\:\\:resolveRefSchema\\(\\) should return object\\|string\\|null but returns mixed\\.$#" + count: 1 + path: src/JsonSchema/SchemaStorage.php + + - + message: "#^Method JsonSchema\\\\SchemaStorage\\:\\:resolveRefSchema\\(\\) should return object\\|string\\|null but returns object\\|false\\.$#" count: 1 path: src/JsonSchema/SchemaStorage.php @@ -751,52 +831,22 @@ parameters: path: src/JsonSchema/SchemaStorage.php - - message: "#^Method JsonSchema\\\\SchemaStorageInterface\\:\\:addSchema\\(\\) has no return type specified\\.$#" + message: "#^Offset 1 does not exist on array\\{0\\?\\: string, 1\\?\\: string\\}\\.$#" count: 1 - path: src/JsonSchema/SchemaStorageInterface.php + path: src/JsonSchema/Uri/Retrievers/Curl.php - - message: "#^Method JsonSchema\\\\Uri\\\\Retrievers\\\\Curl\\:\\:fetchMessageBody\\(\\) has no return type specified\\.$#" + message: "#^Property JsonSchema\\\\Uri\\\\Retrievers\\\\Curl\\:\\:\\$messageBody has no type specified\\.$#" count: 1 path: src/JsonSchema/Uri/Retrievers/Curl.php - - message: "#^Offset 1 does not exist on array\\{0\\?\\: string, 1\\?\\: string\\}\\.$#" + message: "#^Method JsonSchema\\\\Uri\\\\Retrievers\\\\FileGetContents\\:\\:fetchContentType\\(\\) has parameter \\$headers with no value type specified in iterable type array\\.$#" count: 1 - path: src/JsonSchema/Uri/Retrievers/Curl.php + path: src/JsonSchema/Uri/Retrievers/FileGetContents.php - - message: "#^Parameter \\#1 \\$response of method JsonSchema\\\\Uri\\\\Retrievers\\\\Curl\\:\\:fetchContentType\\(\\) expects string, string\\|true given\\.$#" - count: 1 - path: src/JsonSchema/Uri/Retrievers/Curl.php - - - - message: "#^Parameter \\#1 \\$response of method JsonSchema\\\\Uri\\\\Retrievers\\\\Curl\\:\\:fetchMessageBody\\(\\) expects string, string\\|true given\\.$#" - count: 1 - path: src/JsonSchema/Uri/Retrievers/Curl.php - - - - message: "#^Property JsonSchema\\\\Uri\\\\Retrievers\\\\Curl\\:\\:\\$messageBody has no type specified\\.$#" - count: 1 - path: src/JsonSchema/Uri/Retrievers/Curl.php - - - - message: "#^Method JsonSchema\\\\Uri\\\\Retrievers\\\\FileGetContents\\:\\:fetchContentType\\(\\) has parameter \\$headers with no value type specified in iterable type array\\.$#" - count: 1 - path: src/JsonSchema/Uri/Retrievers/FileGetContents.php - - - - message: "#^Parameter \\#1 \\$callback of function set_error_handler expects \\(callable\\(int, string, string, int, array\\)\\: bool\\)\\|null, Closure\\(mixed, mixed\\)\\: void given\\.$#" - count: 1 - path: src/JsonSchema/Uri/Retrievers/FileGetContents.php - - - - message: "#^Property JsonSchema\\\\Uri\\\\Retrievers\\\\AbstractRetriever\\:\\:\\$contentType \\(string\\) does not accept null\\.$#" - count: 1 - path: src/JsonSchema/Uri/Retrievers/FileGetContents.php - - - - message: "#^Property JsonSchema\\\\Uri\\\\Retrievers\\\\AbstractRetriever\\:\\:\\$contentType \\(string\\) does not accept string\\|null\\.$#" + message: "#^Parameter \\#1 \\$callback of function set_error_handler expects \\(callable\\(int, string, string, int, array\\)\\: bool\\)\\|null, Closure\\(mixed, mixed\\)\\: void given\\.$#" count: 1 path: src/JsonSchema/Uri/Retrievers/FileGetContents.php @@ -847,16 +897,11 @@ parameters: - message: "#^Call to function is_null\\(\\) with string will always evaluate to false\\.$#" - count: 2 - path: src/JsonSchema/Uri/UriRetriever.php - - - - message: "#^Cannot call method retrieve\\(\\) on JsonSchema\\\\Uri\\\\Retrievers\\\\UriRetrieverInterface\\|null\\.$#" count: 1 path: src/JsonSchema/Uri/UriRetriever.php - - message: "#^Method JsonSchema\\\\Uri\\\\UriRetriever\\:\\:addInvalidContentTypeEndpoint\\(\\) has no return type specified\\.$#" + message: "#^Cannot call method retrieve\\(\\) on JsonSchema\\\\Uri\\\\Retrievers\\\\UriRetrieverInterface\\|null\\.$#" count: 1 path: src/JsonSchema/Uri/UriRetriever.php @@ -871,17 +916,17 @@ parameters: path: src/JsonSchema/Uri/UriRetriever.php - - message: "#^Method JsonSchema\\\\Uri\\\\UriRetriever\\:\\:parse\\(\\) return type has no value type specified in iterable type array\\.$#" + message: "#^Method JsonSchema\\\\Uri\\\\UriRetriever\\:\\:loadSchema\\(\\) should return object\\|string but returns mixed\\.$#" count: 1 path: src/JsonSchema/Uri/UriRetriever.php - - message: "#^Method JsonSchema\\\\Uri\\\\UriRetriever\\:\\:retrieve\\(\\) has parameter \\$translate with no type specified\\.$#" + message: "#^Method JsonSchema\\\\Uri\\\\UriRetriever\\:\\:parse\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 path: src/JsonSchema/Uri/UriRetriever.php - - message: "#^Method JsonSchema\\\\Uri\\\\UriRetriever\\:\\:setTranslation\\(\\) has no return type specified\\.$#" + message: "#^Method JsonSchema\\\\Uri\\\\UriRetriever\\:\\:retrieve\\(\\) has parameter \\$translate with no type specified\\.$#" count: 1 path: src/JsonSchema/Uri/UriRetriever.php @@ -896,12 +941,12 @@ parameters: path: src/JsonSchema/Uri/UriRetriever.php - - message: "#^Method JsonSchema\\\\Uri\\\\UriRetriever\\:\\:translate\\(\\) has no return type specified\\.$#" + message: "#^Method JsonSchema\\\\Uri\\\\UriRetriever\\:\\:translate\\(\\) has parameter \\$uri with no type specified\\.$#" count: 1 path: src/JsonSchema/Uri/UriRetriever.php - - message: "#^Method JsonSchema\\\\Uri\\\\UriRetriever\\:\\:translate\\(\\) has parameter \\$uri with no type specified\\.$#" + message: "#^Parameter \\#1 \\$jsonSchema of method JsonSchema\\\\Uri\\\\UriRetriever\\:\\:resolvePointer\\(\\) expects object, object\\|string given\\.$#" count: 1 path: src/JsonSchema/Uri/UriRetriever.php @@ -916,14 +961,14 @@ parameters: path: src/JsonSchema/Uri/UriRetriever.php - - message: "#^Property JsonSchema\\\\Uri\\\\UriRetriever\\:\\:\\$translationMap type has no value type specified in iterable type array\\.$#" + message: "#^Property JsonSchema\\\\Uri\\\\UriRetriever\\:\\:\\$schemaCache \\(array\\\\) does not accept array\\.$#" count: 1 path: src/JsonSchema/Uri/UriRetriever.php - - message: "#^Method JsonSchema\\\\Validator\\:\\:check\\(\\) has no return type specified\\.$#" + message: "#^Property JsonSchema\\\\Uri\\\\UriRetriever\\:\\:\\$translationMap type has no value type specified in iterable type array\\.$#" count: 1 - path: src/JsonSchema/Validator.php + path: src/JsonSchema/Uri/UriRetriever.php - message: "#^Method JsonSchema\\\\Validator\\:\\:check\\(\\) has parameter \\$schema with no type specified\\.$#" @@ -936,17 +981,1317 @@ parameters: path: src/JsonSchema/Validator.php - - message: "#^Method JsonSchema\\\\Validator\\:\\:coerce\\(\\) has no return type specified\\.$#" + message: "#^Method JsonSchema\\\\Validator\\:\\:coerce\\(\\) has parameter \\$schema with no type specified\\.$#" count: 1 path: src/JsonSchema/Validator.php - - message: "#^Method JsonSchema\\\\Validator\\:\\:coerce\\(\\) has parameter \\$schema with no type specified\\.$#" + message: "#^Method JsonSchema\\\\Validator\\:\\:coerce\\(\\) has parameter \\$value with no type specified\\.$#" count: 1 path: src/JsonSchema/Validator.php - - message: "#^Method JsonSchema\\\\Validator\\:\\:coerce\\(\\) has parameter \\$value with no type specified\\.$#" + message: "#^Parameter \\#2 \\$schema of method JsonSchema\\\\SchemaStorageInterface\\:\\:addSchema\\(\\) expects object\\|null, mixed given\\.$#" count: 1 path: src/JsonSchema/Validator.php + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\AdditionalPropertiesTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/AdditionalPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\AdditionalPropertiesTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/AdditionalPropertiesTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\AdditionalPropertiesTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/AdditionalPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\ArraysTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/ArraysTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\ArraysTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/ArraysTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\ArraysTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/ArraysTest.php + + - + message: "#^Access to an undefined property object\\:\\:\\$\\$schema\\.$#" + count: 4 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:getInvalidForAssocTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:getValidForAssocTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:testInvalidCases\\(\\) has parameter \\$checkMode with no type specified\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:testInvalidCases\\(\\) has parameter \\$errors with no type specified\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:testInvalidCases\\(\\) has parameter \\$input with no type specified\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:testInvalidCases\\(\\) has parameter \\$schema with no type specified\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:testInvalidCasesUsingAssoc\\(\\) has parameter \\$checkMode with no type specified\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:testInvalidCasesUsingAssoc\\(\\) has parameter \\$errors with no type specified\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:testInvalidCasesUsingAssoc\\(\\) has parameter \\$input with no type specified\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:testInvalidCasesUsingAssoc\\(\\) has parameter \\$schema with no type specified\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:testValidCases\\(\\) has parameter \\$checkMode with no type specified\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:testValidCases\\(\\) has parameter \\$input with no type specified\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:testValidCases\\(\\) has parameter \\$schema with no type specified\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:testValidCasesUsingAssoc\\(\\) has parameter \\$checkMode with no type specified\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:testValidCasesUsingAssoc\\(\\) has parameter \\$input with no type specified\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:testValidCasesUsingAssoc\\(\\) has parameter \\$schema with no type specified\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Parameter \\#1 \\$schema of method JsonSchema\\\\Tests\\\\Constraints\\\\VeryBaseTestCase\\:\\:getUriRetrieverMock\\(\\) expects object\\|null, mixed given\\.$#" + count: 4 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Parameter \\#1 \\$uriRetriever of class JsonSchema\\\\SchemaStorage constructor expects JsonSchema\\\\UriRetrieverInterface\\|null, object given\\.$#" + count: 4 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:\\$schemaSpec has no type specified\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\BaseTestCase\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/BaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BasicTypesTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/BasicTypesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\BasicTypesTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/BasicTypesTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\BasicTypesTest\\:\\:\\$schemaSpec has no type specified\\.$#" + count: 1 + path: tests/Constraints/BasicTypesTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\BasicTypesTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/BasicTypesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\CoerciveTest\\:\\:dataCoerceCases\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/CoerciveTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\CoerciveTest\\:\\:testCoerceCases\\(\\) has parameter \\$assoc with no type specified\\.$#" + count: 1 + path: tests/Constraints/CoerciveTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\CoerciveTest\\:\\:testCoerceCases\\(\\) has parameter \\$data with no type specified\\.$#" + count: 1 + path: tests/Constraints/CoerciveTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\CoerciveTest\\:\\:testCoerceCases\\(\\) has parameter \\$endType with no type specified\\.$#" + count: 1 + path: tests/Constraints/CoerciveTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\CoerciveTest\\:\\:testCoerceCases\\(\\) has parameter \\$endValue with no type specified\\.$#" + count: 1 + path: tests/Constraints/CoerciveTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\CoerciveTest\\:\\:testCoerceCases\\(\\) has parameter \\$extraFlags with no type specified\\.$#" + count: 1 + path: tests/Constraints/CoerciveTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\CoerciveTest\\:\\:testCoerceCases\\(\\) has parameter \\$schema with no type specified\\.$#" + count: 1 + path: tests/Constraints/CoerciveTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\CoerciveTest\\:\\:testCoerceCases\\(\\) has parameter \\$startType with no type specified\\.$#" + count: 1 + path: tests/Constraints/CoerciveTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\CoerciveTest\\:\\:testCoerceCases\\(\\) has parameter \\$valid with no type specified\\.$#" + count: 1 + path: tests/Constraints/CoerciveTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\CoerciveTest\\:\\:testCoerceCasesUsingAssoc\\(\\) has parameter \\$data with no type specified\\.$#" + count: 1 + path: tests/Constraints/CoerciveTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\CoerciveTest\\:\\:testCoerceCasesUsingAssoc\\(\\) has parameter \\$early with no type specified\\.$#" + count: 1 + path: tests/Constraints/CoerciveTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\CoerciveTest\\:\\:testCoerceCasesUsingAssoc\\(\\) has parameter \\$endType with no type specified\\.$#" + count: 1 + path: tests/Constraints/CoerciveTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\CoerciveTest\\:\\:testCoerceCasesUsingAssoc\\(\\) has parameter \\$endValue with no type specified\\.$#" + count: 1 + path: tests/Constraints/CoerciveTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\CoerciveTest\\:\\:testCoerceCasesUsingAssoc\\(\\) has parameter \\$schema with no type specified\\.$#" + count: 1 + path: tests/Constraints/CoerciveTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\CoerciveTest\\:\\:testCoerceCasesUsingAssoc\\(\\) has parameter \\$startType with no type specified\\.$#" + count: 1 + path: tests/Constraints/CoerciveTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\CoerciveTest\\:\\:testCoerceCasesUsingAssoc\\(\\) has parameter \\$valid with no type specified\\.$#" + count: 1 + path: tests/Constraints/CoerciveTest.php + + - + message: "#^Parameter \\#3 \\$checkMode of method JsonSchema\\\\Validator\\:\\:validate\\(\\) expects int\\<0, 511\\>\\|null, int given\\.$#" + count: 1 + path: tests/Constraints/CoerciveTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\CoerciveTest\\:\\:\\$factory has no type specified\\.$#" + count: 1 + path: tests/Constraints/CoerciveTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\ConstTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/ConstTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\ConstTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/ConstTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\ConstTest\\:\\:\\$schemaSpec has no type specified\\.$#" + count: 1 + path: tests/Constraints/ConstTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\ConstTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/ConstTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\DefaultPropertiesTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/DefaultPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\DefaultPropertiesTest\\:\\:testValidCases\\(\\) has parameter \\$checkMode with no type specified\\.$#" + count: 1 + path: tests/Constraints/DefaultPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\DefaultPropertiesTest\\:\\:testValidCases\\(\\) has parameter \\$expectOutput with no type specified\\.$#" + count: 1 + path: tests/Constraints/DefaultPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\DefaultPropertiesTest\\:\\:testValidCases\\(\\) has parameter \\$input with no type specified\\.$#" + count: 1 + path: tests/Constraints/DefaultPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\DefaultPropertiesTest\\:\\:testValidCases\\(\\) has parameter \\$schema with no type specified\\.$#" + count: 1 + path: tests/Constraints/DefaultPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\DefaultPropertiesTest\\:\\:testValidCasesUsingAssoc\\(\\) has parameter \\$checkMode with no type specified\\.$#" + count: 1 + path: tests/Constraints/DefaultPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\DefaultPropertiesTest\\:\\:testValidCasesUsingAssoc\\(\\) has parameter \\$expectOutput with no type specified\\.$#" + count: 1 + path: tests/Constraints/DefaultPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\DefaultPropertiesTest\\:\\:testValidCasesUsingAssoc\\(\\) has parameter \\$input with no type specified\\.$#" + count: 1 + path: tests/Constraints/DefaultPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\DefaultPropertiesTest\\:\\:testValidCasesUsingAssoc\\(\\) has parameter \\$schema with no type specified\\.$#" + count: 1 + path: tests/Constraints/DefaultPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\DefaultPropertiesTest\\:\\:testValidCasesUsingAssocWithoutTypeCast\\(\\) has parameter \\$checkMode with no type specified\\.$#" + count: 1 + path: tests/Constraints/DefaultPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\DefaultPropertiesTest\\:\\:testValidCasesUsingAssocWithoutTypeCast\\(\\) has parameter \\$expectOutput with no type specified\\.$#" + count: 1 + path: tests/Constraints/DefaultPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\DefaultPropertiesTest\\:\\:testValidCasesUsingAssocWithoutTypeCast\\(\\) has parameter \\$input with no type specified\\.$#" + count: 1 + path: tests/Constraints/DefaultPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\DefaultPropertiesTest\\:\\:testValidCasesUsingAssocWithoutTypeCast\\(\\) has parameter \\$schema with no type specified\\.$#" + count: 1 + path: tests/Constraints/DefaultPropertiesTest.php + + - + message: "#^Parameter \\#2 \\$schema of method JsonSchema\\\\SchemaStorage\\:\\:addSchema\\(\\) expects object\\|null, mixed given\\.$#" + count: 1 + path: tests/Constraints/DefaultPropertiesTest.php + + - + message: "#^Parameter \\#3 \\$checkMode of method JsonSchema\\\\Validator\\:\\:validate\\(\\) expects int\\<0, 511\\>\\|null, int given\\.$#" + count: 1 + path: tests/Constraints/DefaultPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\DependenciesTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/DependenciesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\DependenciesTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/DependenciesTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\DependenciesTest\\:\\:\\$schemaSpec has no type specified\\.$#" + count: 1 + path: tests/Constraints/DependenciesTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\DependenciesTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/DependenciesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\DisallowTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/DisallowTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\DisallowTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/DisallowTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\DisallowTest\\:\\:\\$schemaSpec has no type specified\\.$#" + count: 1 + path: tests/Constraints/DisallowTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\DisallowTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/DisallowTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\DivisibleByTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/DivisibleByTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\DivisibleByTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/DivisibleByTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\DivisibleByTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/DivisibleByTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\EnumTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/EnumTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\EnumTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/EnumTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\EnumTest\\:\\:\\$schemaSpec has no type specified\\.$#" + count: 1 + path: tests/Constraints/EnumTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\EnumTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/EnumTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\ExtendsTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/ExtendsTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\ExtendsTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/ExtendsTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\ExtendsTest\\:\\:\\$schemaSpec has no type specified\\.$#" + count: 1 + path: tests/Constraints/ExtendsTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\ExtendsTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/ExtendsTest.php + + - + message: "#^Parameter \\#1 \\$expected of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) expects class\\-string\\, string given\\.$#" + count: 1 + path: tests/Constraints/FactoryTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\FormatTest\\:\\:getInvalidFormats\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/FormatTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\FormatTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/FormatTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\FormatTest\\:\\:getValidFormats\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/FormatTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\FormatTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/FormatTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\FormatTest\\:\\:testDisabledFormat\\(\\) has parameter \\$format with no type specified\\.$#" + count: 1 + path: tests/Constraints/FormatTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\FormatTest\\:\\:testDisabledFormat\\(\\) has parameter \\$string with no type specified\\.$#" + count: 1 + path: tests/Constraints/FormatTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\FormatTest\\:\\:testInvalidFormat\\(\\) has parameter \\$format with no type specified\\.$#" + count: 1 + path: tests/Constraints/FormatTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\FormatTest\\:\\:testInvalidFormat\\(\\) has parameter \\$string with no type specified\\.$#" + count: 1 + path: tests/Constraints/FormatTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\FormatTest\\:\\:testValidFormat\\(\\) has parameter \\$format with no type specified\\.$#" + count: 1 + path: tests/Constraints/FormatTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\FormatTest\\:\\:testValidFormat\\(\\) has parameter \\$string with no type specified\\.$#" + count: 1 + path: tests/Constraints/FormatTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\FormatTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/FormatTest.php + + - + message: "#^Parameter \\#1 \\$json of function json_decode expects string, string\\|false given\\.$#" + count: 3 + path: tests/Constraints/LongArraysTest.php + + - + message: "#^Parameter \\#1 \\$uriRetriever of class JsonSchema\\\\SchemaStorage constructor expects JsonSchema\\\\UriRetrieverInterface\\|null, object given\\.$#" + count: 3 + path: tests/Constraints/LongArraysTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\LongArraysTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/LongArraysTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\MinItemsMaxItemsTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/MinItemsMaxItemsTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\MinItemsMaxItemsTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/MinItemsMaxItemsTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\MinItemsMaxItemsTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/MinItemsMaxItemsTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\MinLengthMaxLengthMultiByteTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/MinLengthMaxLengthMultiByteTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\MinLengthMaxLengthMultiByteTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/MinLengthMaxLengthMultiByteTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\MinLengthMaxLengthMultiByteTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/MinLengthMaxLengthMultiByteTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\MinLengthMaxLengthTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/MinLengthMaxLengthTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\MinLengthMaxLengthTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/MinLengthMaxLengthTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\MinLengthMaxLengthTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/MinLengthMaxLengthTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\MinMaxPropertiesTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/MinMaxPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\MinMaxPropertiesTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/MinMaxPropertiesTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\MinMaxPropertiesTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/MinMaxPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\MinimumMaximumTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/MinimumMaximumTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\MinimumMaximumTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/MinimumMaximumTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\MinimumMaximumTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/MinimumMaximumTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\NotTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/NotTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\NotTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/NotTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\NotTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/NotTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\NumberAndIntegerTypesTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/NumberAndIntegerTypesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\NumberAndIntegerTypesTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/NumberAndIntegerTypesTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\NumberAndIntegerTypesTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/NumberAndIntegerTypesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\OfPropertiesTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/OfPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\OfPropertiesTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/OfPropertiesTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\OfPropertiesTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/OfPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\PatternPropertiesTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/PatternPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\PatternPropertiesTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/PatternPropertiesTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\PatternPropertiesTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/PatternPropertiesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\PatternTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/PatternTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\PatternTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/PatternTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\PatternTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/PatternTest.php + + - + message: "#^Parameter \\#1 \\$json of function json_decode expects string, string\\|false given\\.$#" + count: 2 + path: tests/Constraints/PointerTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\PointerTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/PointerTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\ReadOnlyTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/ReadOnlyTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\ReadOnlyTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/ReadOnlyTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\ReadOnlyTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/ReadOnlyTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\RequireTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/RequireTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\RequireTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/RequireTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\RequireTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/RequireTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\RequiredPropertyTest\\:\\:assertErrorHasExpectedPropertyValue\\(\\) has parameter \\$error with no type specified\\.$#" + count: 1 + path: tests/Constraints/RequiredPropertyTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\RequiredPropertyTest\\:\\:assertErrorHasExpectedPropertyValue\\(\\) has parameter \\$propertyValue with no type specified\\.$#" + count: 1 + path: tests/Constraints/RequiredPropertyTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\RequiredPropertyTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/RequiredPropertyTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\RequiredPropertyTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/RequiredPropertyTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\RequiredPropertyTest\\:\\:\\$schemaSpec has no type specified\\.$#" + count: 1 + path: tests/Constraints/RequiredPropertyTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\RequiredPropertyTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/RequiredPropertyTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\SchemaValidationTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/SchemaValidationTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\SchemaValidationTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/SchemaValidationTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\SchemaValidationTest\\:\\:testInvalidCases\\(\\) has parameter \\$schema with no type specified\\.$#" + count: 1 + path: tests/Constraints/SchemaValidationTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\SchemaValidationTest\\:\\:testValidCases\\(\\) has parameter \\$schema with no type specified\\.$#" + count: 1 + path: tests/Constraints/SchemaValidationTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\SchemaValidationTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/SchemaValidationTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\SelfDefinedSchemaTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/SelfDefinedSchemaTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\SelfDefinedSchemaTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/SelfDefinedSchemaTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\SelfDefinedSchemaTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/SelfDefinedSchemaTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\TupleTypingTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/TupleTypingTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\TupleTypingTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/TupleTypingTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\TupleTypingTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/TupleTypingTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\TypeTest\\:\\:provideIndefiniteArticlesForTypes\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/TypeTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\TypeTest\\:\\:testIndefiniteArticleForTypeInTypeCheckErrorMessage\\(\\) has parameter \\$label with no type specified\\.$#" + count: 1 + path: tests/Constraints/TypeTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\TypeTest\\:\\:testIndefiniteArticleForTypeInTypeCheckErrorMessage\\(\\) has parameter \\$type with no type specified\\.$#" + count: 1 + path: tests/Constraints/TypeTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\TypeTest\\:\\:testIndefiniteArticleForTypeInTypeCheckErrorMessage\\(\\) has parameter \\$value with no type specified\\.$#" + count: 1 + path: tests/Constraints/TypeTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\TypeTest\\:\\:testIndefiniteArticleForTypeInTypeCheckErrorMessage\\(\\) has parameter \\$wording with no type specified\\.$#" + count: 1 + path: tests/Constraints/TypeTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\TypeTest\\:\\:testValidateTypeNameWording\\(\\) has parameter \\$nameWording with no type specified\\.$#" + count: 1 + path: tests/Constraints/TypeTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\TypeTest\\:\\:validNameWordingDataProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/TypeTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\UnionTypesTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/UnionTypesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\UnionTypesTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/UnionTypesTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\UnionTypesTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/UnionTypesTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\UnionWithNullValueTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/UnionWithNullValueTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\UnionWithNullValueTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/UnionWithNullValueTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\UnionWithNullValueTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/UnionWithNullValueTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\UniqueItemsTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/UniqueItemsTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\UniqueItemsTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/UniqueItemsTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\UniqueItemsTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/UniqueItemsTest.php + + - + message: "#^Call to an undefined method Prophecy\\\\Prophecy\\\\ObjectProphecy\\:\\:retrieve\\(\\)\\.$#" + count: 2 + path: tests/Constraints/VeryBaseTestCase.php + + - + message: "#^Cannot access offset 'path' on array\\{scheme\\?\\: string, host\\?\\: string, port\\?\\: int\\<0, 65535\\>, user\\?\\: string, pass\\?\\: string, path\\?\\: string, query\\?\\: string, fragment\\?\\: string\\}\\|false\\.$#" + count: 2 + path: tests/Constraints/VeryBaseTestCase.php + + - + message: "#^Negated boolean expression is always false\\.$#" + count: 2 + path: tests/Constraints/VeryBaseTestCase.php + + - + message: "#^Parameter \\#1 \\$json of function json_decode expects string, string\\|false given\\.$#" + count: 4 + path: tests/Constraints/VeryBaseTestCase.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\VeryBaseTestCase\\:\\:\\$jsonSchemaDraft03 \\(object\\) does not accept mixed\\.$#" + count: 1 + path: tests/Constraints/VeryBaseTestCase.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\VeryBaseTestCase\\:\\:\\$jsonSchemaDraft04 \\(object\\) does not accept mixed\\.$#" + count: 1 + path: tests/Constraints/VeryBaseTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\WrongMessagesFailingTestCaseTest\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/WrongMessagesFailingTestCaseTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Constraints\\\\WrongMessagesFailingTestCaseTest\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Constraints/WrongMessagesFailingTestCaseTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Constraints\\\\WrongMessagesFailingTestCaseTest\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Constraints/WrongMessagesFailingTestCaseTest.php + + - + message: "#^Argument of an invalid type array\\\\|false supplied for foreach, only iterables are supported\\.$#" + count: 1 + path: tests/Drafts/BaseDraftTestCase.php + + - + message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#" + count: 1 + path: tests/Drafts/BaseDraftTestCase.php + + - + message: "#^Cannot access property \\$description on mixed\\.$#" + count: 1 + path: tests/Drafts/BaseDraftTestCase.php + + - + message: "#^Cannot access property \\$schema on mixed\\.$#" + count: 1 + path: tests/Drafts/BaseDraftTestCase.php + + - + message: "#^Cannot access property \\$tests on mixed\\.$#" + count: 1 + path: tests/Drafts/BaseDraftTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Drafts\\\\BaseDraftTestCase\\:\\:getInvalidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Drafts/BaseDraftTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Drafts\\\\BaseDraftTestCase\\:\\:getValidTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Drafts/BaseDraftTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Drafts\\\\BaseDraftTestCase\\:\\:setUpTests\\(\\) has parameter \\$isValid with no type specified\\.$#" + count: 1 + path: tests/Drafts/BaseDraftTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Drafts\\\\BaseDraftTestCase\\:\\:setUpTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Drafts/BaseDraftTestCase.php + + - + message: "#^Parameter \\#1 \\$json of function json_decode expects string, string\\|false given\\.$#" + count: 1 + path: tests/Drafts/BaseDraftTestCase.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Drafts\\\\Draft3Test\\:\\:getFilePaths\\(\\) should return array\\ but returns array\\\\.$#" + count: 1 + path: tests/Drafts/Draft3Test.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Drafts\\\\Draft3Test\\:\\:getInvalidForAssocTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Drafts/Draft3Test.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Drafts\\\\Draft3Test\\:\\:getValidForAssocTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Drafts/Draft3Test.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Drafts\\\\Draft3Test\\:\\:\\$schemaSpec has no type specified\\.$#" + count: 1 + path: tests/Drafts/Draft3Test.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Drafts\\\\Draft3Test\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Drafts/Draft3Test.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Drafts\\\\Draft4Test\\:\\:getFilePaths\\(\\) should return array\\ but returns array\\\\.$#" + count: 1 + path: tests/Drafts/Draft4Test.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Drafts\\\\Draft4Test\\:\\:getInvalidForAssocTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Drafts/Draft4Test.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Drafts\\\\Draft4Test\\:\\:getValidForAssocTests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Drafts/Draft4Test.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Drafts\\\\Draft4Test\\:\\:\\$schemaSpec has no type specified\\.$#" + count: 1 + path: tests/Drafts/Draft4Test.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Drafts\\\\Draft4Test\\:\\:\\$validateSchema has no type specified\\.$#" + count: 1 + path: tests/Drafts/Draft4Test.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Entity\\\\JsonPointerTest\\:\\:testJsonPointer\\(\\) has parameter \\$expectedPropertyPaths with no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Entity/JsonPointerTest.php + + - + message: "#^Parameter \\#1 \\$value of class JsonSchema\\\\Entity\\\\JsonPointer constructor expects string, null given\\.$#" + count: 1 + path: tests/Entity/JsonPointerTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Exception\\\\JsonDecodingExceptionTest\\:\\:testDefaultMessage\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Exception/JsonDecodingExceptionTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Exception\\\\JsonDecodingExceptionTest\\:\\:testErrorControlCharacterMessage\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Exception/JsonDecodingExceptionTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Exception\\\\JsonDecodingExceptionTest\\:\\:testErrorDepthMessage\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Exception/JsonDecodingExceptionTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Exception\\\\JsonDecodingExceptionTest\\:\\:testErrorInfiniteOrNotANumberMessage\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Exception/JsonDecodingExceptionTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Exception\\\\JsonDecodingExceptionTest\\:\\:testErrorNoneMessage\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Exception/JsonDecodingExceptionTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Exception\\\\JsonDecodingExceptionTest\\:\\:testErrorRecursionMessage\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Exception/JsonDecodingExceptionTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Exception\\\\JsonDecodingExceptionTest\\:\\:testErrorStateMismatchMessage\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Exception/JsonDecodingExceptionTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Exception\\\\JsonDecodingExceptionTest\\:\\:testErrorSyntaxMessage\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Exception/JsonDecodingExceptionTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Exception\\\\JsonDecodingExceptionTest\\:\\:testErrorUnsupportedTypeMessage\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Exception/JsonDecodingExceptionTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Exception\\\\JsonDecodingExceptionTest\\:\\:testErrorUtf8Message\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Exception/JsonDecodingExceptionTest.php + + - + message: "#^Parameter \\#1 \\$obj of function get_object_vars expects object, mixed given\\.$#" + count: 1 + path: tests/Iterators/ObjectIteratorTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Iterators\\\\ObjectIteratorTest\\:\\:\\$testObject has no type specified\\.$#" + count: 1 + path: tests/Iterators/ObjectIteratorTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\RefTest\\:\\:dataRefIgnoresSiblings\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/RefTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\RefTest\\:\\:testRefIgnoresSiblings\\(\\) has parameter \\$document with no type specified\\.$#" + count: 1 + path: tests/RefTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\RefTest\\:\\:testRefIgnoresSiblings\\(\\) has parameter \\$exception with no type specified\\.$#" + count: 1 + path: tests/RefTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\RefTest\\:\\:testRefIgnoresSiblings\\(\\) has parameter \\$isValid with no type specified\\.$#" + count: 1 + path: tests/RefTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\RefTest\\:\\:testRefIgnoresSiblings\\(\\) has parameter \\$schema with no type specified\\.$#" + count: 1 + path: tests/RefTest.php + + - + message: "#^Call to an undefined method JsonSchema\\\\Uri\\\\UriRetriever\\:\\:reveal\\(\\)\\.$#" + count: 1 + path: tests/SchemaStorageTest.php + + - + message: "#^Call to an undefined method Prophecy\\\\Prophecy\\\\ObjectProphecy\\:\\:retrieve\\(\\)\\.$#" + count: 3 + path: tests/SchemaStorageTest.php + + - + message: "#^Cannot access offset 'test/schema' on mixed\\.$#" + count: 1 + path: tests/SchemaStorageTest.php + + - + message: "#^Cannot access property \\$\\$ref on mixed\\.$#" + count: 1 + path: tests/SchemaStorageTest.php + + - + message: "#^Cannot access property \\$properties on object\\|string\\|false\\|null\\.$#" + count: 3 + path: tests/SchemaStorageTest.php + + - + message: "#^Cannot call method willReturn\\(\\) on object\\|null\\.$#" + count: 3 + path: tests/SchemaStorageTest.php + + - + message: "#^Parameter \\#1 \\$uriRetriever of class JsonSchema\\\\SchemaStorage constructor expects JsonSchema\\\\UriRetrieverInterface\\|null, object given\\.$#" + count: 3 + path: tests/SchemaStorageTest.php + + - + message: "#^Result of method JsonSchema\\\\SchemaStorage\\:\\:addSchema\\(\\) \\(void\\) is used\\.$#" + count: 1 + path: tests/SchemaStorageTest.php + + - + message: "#^Function JsonSchema\\\\Uri\\\\Retrievers\\\\curl_exec\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Uri/Retrievers/CurlTest.php + + - + message: "#^Function JsonSchema\\\\Uri\\\\Retrievers\\\\curl_exec\\(\\) has parameter \\$curl with no type specified\\.$#" + count: 1 + path: tests/Uri/Retrievers/CurlTest.php + + - + message: "#^Parameter \\#1 \\$expectedFile of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertStringEqualsFileCanonicalizing\\(\\) expects string, string\\|false given\\.$#" + count: 2 + path: tests/Uri/Retrievers/CurlTest.php + + - + message: "#^Parameter \\#1 \\$filename of function file_get_contents expects string, string\\|false given\\.$#" + count: 1 + path: tests/Uri/Retrievers/CurlTest.php + + - + message: "#^Parameter \\#1 \\$uri of method JsonSchema\\\\Uri\\\\Retrievers\\\\Curl\\:\\:retrieve\\(\\) expects string, string\\|false given\\.$#" + count: 1 + path: tests/Uri/Retrievers/CurlTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Uri\\\\Retrievers\\\\PredefinedArrayTest\\:\\:\\$retriever has no type specified\\.$#" + count: 1 + path: tests/Uri/Retrievers/PredefinedArrayTest.php + + - + message: "#^Cannot access offset 'extends' on mixed\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Uri\\\\UriRetrieverTest\\:\\:combinedURITests\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Uri\\\\UriRetrieverTest\\:\\:getRetrieverMock\\(\\) has no return type specified\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Uri\\\\UriRetrieverTest\\:\\:getRetrieverMock\\(\\) has parameter \\$returnSchema with no type specified\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Uri\\\\UriRetrieverTest\\:\\:jsonProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Uri\\\\UriRetrieverTest\\:\\:mockRetriever\\(\\) has parameter \\$schema with no type specified\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Uri\\\\UriRetrieverTest\\:\\:setParentSchemaExtendsValue\\(\\) has parameter \\$parentSchema with no type specified\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Uri\\\\UriRetrieverTest\\:\\:setParentSchemaExtendsValue\\(\\) has parameter \\$value with no type specified\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Uri\\\\UriRetrieverTest\\:\\:testChildExtendsParentInvalidChildTest\\(\\) has parameter \\$childSchema with no type specified\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Uri\\\\UriRetrieverTest\\:\\:testChildExtendsParentInvalidChildTest\\(\\) has parameter \\$parentSchema with no type specified\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Uri\\\\UriRetrieverTest\\:\\:testChildExtendsParentInvalidParentTest\\(\\) has parameter \\$childSchema with no type specified\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Uri\\\\UriRetrieverTest\\:\\:testChildExtendsParentInvalidParentTest\\(\\) has parameter \\$parentSchema with no type specified\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Uri\\\\UriRetrieverTest\\:\\:testChildExtendsParentValidTest\\(\\) has parameter \\$childSchema with no type specified\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Uri\\\\UriRetrieverTest\\:\\:testChildExtendsParentValidTest\\(\\) has parameter \\$parentSchema with no type specified\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Uri\\\\UriRetrieverTest\\:\\:testResolveCombinedURI\\(\\) has parameter \\$baseURI with no type specified\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Uri\\\\UriRetrieverTest\\:\\:testResolveCombinedURI\\(\\) has parameter \\$combinedURI with no type specified\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Uri\\\\UriRetrieverTest\\:\\:testResolveCombinedURI\\(\\) has parameter \\$uri with no type specified\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Uri\\\\UriRetrieverTest\\:\\:testResolveRelativeUri\\(\\) has parameter \\$childSchema with no type specified\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Method JsonSchema\\\\Tests\\\\Uri\\\\UriRetrieverTest\\:\\:testResolveRelativeUri\\(\\) has parameter \\$parentSchema with no type specified\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Parameter \\#1 \\$objectOrValue of method ReflectionProperty\\:\\:setValue\\(\\) expects object\\|null, mixed given\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Parameter \\#1 \\$str of function md5 expects string, string\\|false given\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Parameter \\#2 \\$uri of method JsonSchema\\\\Uri\\\\UriRetriever\\:\\:confirmMediaType\\(\\) expects string, null given\\.$#" + count: 3 + path: tests/Uri/UriRetrieverTest.php + + - + message: "#^Property JsonSchema\\\\Tests\\\\Uri\\\\UriRetrieverTest\\:\\:\\$validator has no type specified\\.$#" + count: 1 + path: tests/Uri/UriRetrieverTest.php + diff --git a/phpstan.neon b/phpstan.neon index 26b360ae..29dc60a1 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,8 +1,8 @@ parameters: - level: 8 + level: max paths: - ./src/ - ignoreErrors: [] + - ./tests/ phpVersion: 70200 includes: diff --git a/src/JsonSchema/ConstraintError.php b/src/JsonSchema/ConstraintError.php index 8b1c1450..417d32b3 100644 --- a/src/JsonSchema/ConstraintError.php +++ b/src/JsonSchema/ConstraintError.php @@ -54,10 +54,7 @@ class ConstraintError extends Enum public const TYPE = 'type'; public const UNIQUE_ITEMS = 'uniqueItems'; - /** - * @return string - */ - public function getMessage() + public function getMessage(): string { $name = $this->getValue(); static $messages = [ diff --git a/src/JsonSchema/Constraints/Factory.php b/src/JsonSchema/Constraints/Factory.php index b9220b9d..330d641b 100644 --- a/src/JsonSchema/Constraints/Factory.php +++ b/src/JsonSchema/Constraints/Factory.php @@ -180,7 +180,6 @@ public function setConstraintClass(string $name, string $class): Factory * @throws InvalidArgumentException if is not possible create the constraint instance * * @return ConstraintInterface&BaseConstraint - * @phpstan-return ConstraintInterface&BaseConstraint */ public function createInstanceFor($constraintName) { diff --git a/src/JsonSchema/Constraints/FormatConstraint.php b/src/JsonSchema/Constraints/FormatConstraint.php index 5b07c0b5..eb76198e 100644 --- a/src/JsonSchema/Constraints/FormatConstraint.php +++ b/src/JsonSchema/Constraints/FormatConstraint.php @@ -169,7 +169,7 @@ public function check(&$element, $schema = null, ?JsonPointer $path = null, $i = } } - protected function validateDateTime($datetime, $format) + protected function validateDateTime($datetime, $format): bool { $dt = \DateTime::createFromFormat($format, (string) $datetime); @@ -184,7 +184,7 @@ protected function validateDateTime($datetime, $format) return false; } - protected function validateRegex($regex) + protected function validateRegex($regex): bool { if (!is_string($regex)) { return true; @@ -193,7 +193,7 @@ protected function validateRegex($regex) return false !== @preg_match(self::jsonPatternToPhpRegex($regex), ''); } - protected function validateColor($color) + protected function validateColor($color): bool { if (!is_string($color)) { return true; @@ -205,10 +205,10 @@ protected function validateColor($color) return true; } - return preg_match('/^#([a-f0-9]{3}|[a-f0-9]{6})$/i', $color); + return 1 === preg_match('/^#([a-f0-9]{3}|[a-f0-9]{6})$/i', $color); } - protected function validateStyle($style) + protected function validateStyle($style): bool { $properties = explode(';', rtrim($style, ';')); $invalidEntries = preg_grep('/^\s*[-a-z]+\s*:\s*.+$/i', $properties, PREG_GREP_INVERT); @@ -216,12 +216,12 @@ protected function validateStyle($style) return empty($invalidEntries); } - protected function validatePhone($phone) + protected function validatePhone($phone): bool { - return preg_match('/^\+?(\(\d{3}\)|\d{3}) \d{3} \d{4}$/', $phone); + return 1 === preg_match('/^\+?(\(\d{3}\)|\d{3}) \d{3} \d{4}$/', $phone); } - protected function validateHostname($host) + protected function validateHostname($host): bool { if (!is_string($host)) { return true; @@ -229,6 +229,6 @@ protected function validateHostname($host) $hostnameRegex = '/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/i'; - return preg_match($hostnameRegex, $host); + return 1 === preg_match($hostnameRegex, $host); } } diff --git a/src/JsonSchema/Constraints/NumberConstraint.php b/src/JsonSchema/Constraints/NumberConstraint.php index e1b2ffc3..2e802bb1 100644 --- a/src/JsonSchema/Constraints/NumberConstraint.php +++ b/src/JsonSchema/Constraints/NumberConstraint.php @@ -70,7 +70,7 @@ public function check(&$element, $schema = null, ?JsonPointer $path = null, $i = $this->checkFormat($element, $schema, $path, $i); } - private function fmod($number1, $number2) + private function fmod($number1, $number2): float { $modulus = ($number1 - round($number1 / $number2) * $number2); $precision = 0.0000000001; diff --git a/src/JsonSchema/Constraints/ObjectConstraint.php b/src/JsonSchema/Constraints/ObjectConstraint.php index 011e600c..706883f3 100644 --- a/src/JsonSchema/Constraints/ObjectConstraint.php +++ b/src/JsonSchema/Constraints/ObjectConstraint.php @@ -54,7 +54,10 @@ public function check(&$element, $schema = null, ?JsonPointer $path = null, $pro $this->validateElement($element, $matches, $schema, $path, $properties, $additionalProp); } - public function validatePatternProperties($element, ?JsonPointer $path, $patternProperties) + /** + * @return list + */ + public function validatePatternProperties($element, ?JsonPointer $path, $patternProperties): array { $matches = []; foreach ($patternProperties as $pregex => $schema) { @@ -87,7 +90,7 @@ public function validatePatternProperties($element, ?JsonPointer $path, $pattern * @param mixed $additionalProp Additional properties */ public function validateElement($element, $matches, $schema = null, ?JsonPointer $path = null, - $properties = null, $additionalProp = null) + $properties = null, $additionalProp = null): void { $this->validateMinMaxConstraint($element, $schema, $path); @@ -131,7 +134,7 @@ public function validateElement($element, $matches, $schema = null, ?JsonPointer * @param \stdClass $properties Property definitions * @param JsonPointer|null $path Path? */ - public function validateProperties(&$element, $properties = null, ?JsonPointer $path = null) + public function validateProperties(&$element, $properties = null, ?JsonPointer $path = null): void { $undefinedConstraint = $this->factory->createInstanceFor('undefined'); @@ -173,7 +176,7 @@ protected function &getProperty(&$element, $property, $fallback = null) * @param \stdClass $objectDefinition ObjectConstraint definition * @param JsonPointer|null $path Path to test? */ - protected function validateMinMaxConstraint($element, $objectDefinition, ?JsonPointer $path = null) + protected function validateMinMaxConstraint($element, $objectDefinition, ?JsonPointer $path = null): void { // Verify minimum number of properties if (isset($objectDefinition->minProperties) && !is_object($objectDefinition->minProperties)) { diff --git a/src/JsonSchema/Constraints/StringConstraint.php b/src/JsonSchema/Constraints/StringConstraint.php index 7b811614..c972f6b5 100644 --- a/src/JsonSchema/Constraints/StringConstraint.php +++ b/src/JsonSchema/Constraints/StringConstraint.php @@ -13,6 +13,7 @@ use JsonSchema\ConstraintError; use JsonSchema\Entity\JsonPointer; +use JsonSchema\Exception\RuntimeException; /** * The StringConstraint Constraints, validates an string against a given schema @@ -51,10 +52,15 @@ public function check(&$element, $schema = null, ?JsonPointer $path = null, $i = $this->checkFormat($element, $schema, $path, $i); } - private function strlen($string) + private function strlen($string): int { if (extension_loaded('mbstring')) { - return mb_strlen($string, mb_detect_encoding($string)); + $result = mb_strlen($string, mb_detect_encoding($string)); + if ($result === false) { + throw new RuntimeException('mb_strlen() failed.'); + } + + return $result; } // mbstring is present on all test platforms, so strlen() can be ignored for coverage diff --git a/src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php b/src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php index 18057512..fb947d9a 100644 --- a/src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php +++ b/src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php @@ -6,20 +6,23 @@ class LooseTypeCheck implements TypeCheckInterface { - public static function isObject($value) + public static function isObject($value): bool { return is_object($value) || (is_array($value) && (count($value) == 0 || self::isAssociativeArray($value))); } - public static function isArray($value) + public static function isArray($value): bool { return is_array($value) && (count($value) == 0 || !self::isAssociativeArray($value)); } + /** + * @return mixed + */ public static function propertyGet($value, $property) { if (is_object($value)) { @@ -29,7 +32,7 @@ public static function propertyGet($value, $property) return $value[$property]; } - public static function propertySet(&$value, $property, $data) + public static function propertySet(&$value, $property, $data): void { if (is_object($value)) { $value->{$property} = $data; @@ -38,7 +41,7 @@ public static function propertySet(&$value, $property, $data) } } - public static function propertyExists($value, $property) + public static function propertyExists($value, $property): bool { if (is_object($value)) { return property_exists($value, $property); @@ -47,7 +50,7 @@ public static function propertyExists($value, $property) return array_key_exists($property, $value); } - public static function propertyCount($value) + public static function propertyCount($value): int { if (is_object($value)) { return count(get_object_vars($value)); @@ -60,10 +63,8 @@ public static function propertyCount($value) * Check if the provided array is associative or not * * @param array $arr - * - * @return bool */ - private static function isAssociativeArray($arr) + private static function isAssociativeArray($arr): bool { return array_keys($arr) !== range(0, count($arr) - 1); } diff --git a/src/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php b/src/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php index b0aa813a..00825b2b 100644 --- a/src/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php +++ b/src/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php @@ -6,12 +6,12 @@ class StrictTypeCheck implements TypeCheckInterface { - public static function isObject($value) + public static function isObject($value): bool { return is_object($value); } - public static function isArray($value) + public static function isArray($value): bool { return is_array($value); } @@ -21,17 +21,17 @@ public static function propertyGet($value, $property) return $value->{$property}; } - public static function propertySet(&$value, $property, $data) + public static function propertySet(&$value, $property, $data): void { $value->{$property} = $data; } - public static function propertyExists($value, $property) + public static function propertyExists($value, $property): bool { return property_exists($value, $property); } - public static function propertyCount($value) + public static function propertyCount($value): int { if (!is_object($value)) { return 0; diff --git a/src/JsonSchema/Constraints/TypeCheck/TypeCheckInterface.php b/src/JsonSchema/Constraints/TypeCheck/TypeCheckInterface.php index 0333b0aa..3c9e15c2 100644 --- a/src/JsonSchema/Constraints/TypeCheck/TypeCheckInterface.php +++ b/src/JsonSchema/Constraints/TypeCheck/TypeCheckInterface.php @@ -6,15 +6,18 @@ interface TypeCheckInterface { - public static function isObject($value); + public static function isObject($value): bool; - public static function isArray($value); + public static function isArray($value): bool; + /** + * @return mixed + */ public static function propertyGet($value, $property); - public static function propertySet(&$value, $property, $data); + public static function propertySet(&$value, $property, $data): void; - public static function propertyExists($value, $property); + public static function propertyExists($value, $property): bool; - public static function propertyCount($value); + public static function propertyCount($value): int; } diff --git a/src/JsonSchema/Constraints/TypeConstraint.php b/src/JsonSchema/Constraints/TypeConstraint.php index fc1aa4eb..8de580d3 100644 --- a/src/JsonSchema/Constraints/TypeConstraint.php +++ b/src/JsonSchema/Constraints/TypeConstraint.php @@ -90,7 +90,7 @@ public function check(&$value = null, $schema = null, ?JsonPointer $path = null, * @param ?JsonPointer $path * @param bool $coerce */ - protected function validateTypesArray(&$value, array $type, &$validTypesWording, &$isValid, $path, $coerce = false) + protected function validateTypesArray(&$value, array $type, &$validTypesWording, &$isValid, $path, $coerce = false): void { foreach ($type as $tp) { // already valid, so no need to waste cycles looping over everything @@ -128,10 +128,8 @@ protected function validateTypesArray(&$value, array $type, &$validTypesWording, * @param array $elements The elements to implode * @param string $delimiter The delimiter to use * @param bool $listEnd The last delimiter to use (defaults to $delimiter) - * - * @return string */ - protected function implodeWith(array $elements, $delimiter = ', ', $listEnd = false) + protected function implodeWith(array $elements, $delimiter = ', ', $listEnd = false): string { if ($listEnd === false || !isset($elements[1])) { return implode($delimiter, $elements); @@ -151,7 +149,7 @@ protected function implodeWith(array $elements, $delimiter = ', ', $listEnd = fa * * @throws StandardUnexpectedValueException */ - protected function validateTypeNameWording($type) + protected function validateTypeNameWording($type): void { if (!array_key_exists($type, self::$wording)) { throw new StandardUnexpectedValueException( @@ -170,10 +168,8 @@ protected function validateTypeNameWording($type) * @param string $type TypeConstraint to check against * * @throws InvalidArgumentException - * - * @return bool */ - protected function validateType(&$value, $type, $coerce = false) + protected function validateType(&$value, $type, $coerce = false): bool { //mostly the case for inline schema if (!$type) { diff --git a/src/JsonSchema/Constraints/UndefinedConstraint.php b/src/JsonSchema/Constraints/UndefinedConstraint.php index 4d955cff..5793ac53 100644 --- a/src/JsonSchema/Constraints/UndefinedConstraint.php +++ b/src/JsonSchema/Constraints/UndefinedConstraint.php @@ -60,10 +60,9 @@ public function check(&$value, $schema = null, ?JsonPointer $path = null, $i = n * * @param mixed $value * @param mixed $schema - * @param JsonPointer $path * @param string $i */ - public function validateTypes(&$value, $schema, JsonPointer $path, $i = null) + public function validateTypes(&$value, $schema, JsonPointer $path, $i = null): void { // check array if ($this->getTypeCheck()->isArray($value)) { @@ -109,12 +108,11 @@ public function validateTypes(&$value, $schema, JsonPointer $path, $i = null) /** * Validates common properties * - * @param mixed $value - * @param mixed $schema - * @param JsonPointer $path - * @param string $i + * @param mixed $value + * @param mixed $schema + * @param string $i */ - protected function validateCommonProperties(&$value, $schema, JsonPointer $path, $i = '') + protected function validateCommonProperties(&$value, $schema, JsonPointer $path, $i = ''): void { // if it extends another schema, it must pass that schema as well if (isset($schema->extends)) { @@ -210,10 +208,8 @@ protected function validateCommonProperties(&$value, $schema, JsonPointer $path, * @param mixed $schema * @param mixed $parentSchema * @param bool $requiredOnly - * - * @return bool */ - private function shouldApplyDefaultValue($requiredOnly, $schema, $name = null, $parentSchema = null) + private function shouldApplyDefaultValue($requiredOnly, $schema, $name = null, $parentSchema = null): bool { // required-only mode is off if (!$requiredOnly) { @@ -305,12 +301,11 @@ protected function applyDefaultValues(&$value, $schema, $path): void /** * Validate allOf, anyOf, and oneOf properties * - * @param mixed $value - * @param mixed $schema - * @param JsonPointer $path - * @param string $i + * @param mixed $value + * @param mixed $schema + * @param string $i */ - protected function validateOfProperties(&$value, $schema, JsonPointer $path, $i = '') + protected function validateOfProperties(&$value, $schema, JsonPointer $path, $i = ''): void { // Verify type if ($value instanceof self) { @@ -379,12 +374,11 @@ protected function validateOfProperties(&$value, $schema, JsonPointer $path, $i /** * Validate dependencies * - * @param mixed $value - * @param mixed $dependencies - * @param JsonPointer $path - * @param string $i + * @param mixed $value + * @param mixed $dependencies + * @param string $i */ - protected function validateDependencies($value, $dependencies, JsonPointer $path, $i = '') + protected function validateDependencies($value, $dependencies, JsonPointer $path, $i = ''): void { foreach ($dependencies as $key => $dependency) { if ($this->getTypeCheck()->propertyExists($value, $key)) { @@ -414,7 +408,7 @@ protected function validateDependencies($value, $dependencies, JsonPointer $path } } - protected function validateUri($schema, $schemaUri = null) + protected function validateUri($schema, $schemaUri = null): ?object { $resolver = new UriResolver(); $retriever = $this->factory->getUriRetriever(); diff --git a/src/JsonSchema/Entity/JsonPointer.php b/src/JsonSchema/Entity/JsonPointer.php index ee4a1d35..f0972ecb 100644 --- a/src/JsonSchema/Entity/JsonPointer.php +++ b/src/JsonSchema/Entity/JsonPointer.php @@ -54,7 +54,7 @@ public function __construct($value) * * @return string[] */ - private function decodePropertyPaths($propertyPathString) + private function decodePropertyPaths($propertyPathString): array { $paths = []; foreach (explode('/', trim($propertyPathString, '/')) as $path) { @@ -67,10 +67,7 @@ private function decodePropertyPaths($propertyPathString) return $paths; } - /** - * @return array - */ - private function encodePropertyPaths() + private function encodePropertyPaths(): array { return array_map( [$this, 'encodePath'], @@ -80,28 +77,21 @@ private function encodePropertyPaths() /** * @param string $path - * - * @return string */ - private function decodePath($path) + private function decodePath($path): string { return strtr($path, ['~1' => '/', '~0' => '~', '%25' => '%']); } /** * @param string $path - * - * @return string */ - private function encodePath($path) + private function encodePath($path): string { return strtr($path, ['/' => '~1', '~' => '~0', '%' => '%25']); } - /** - * @return string - */ - public function getFilename() + public function getFilename(): string { return $this->filename; } @@ -109,17 +99,15 @@ public function getFilename() /** * @return string[] */ - public function getPropertyPaths() + public function getPropertyPaths(): array { return $this->propertyPaths; } /** - * @param array $propertyPaths - * - * @return JsonPointer + * @return static */ - public function withPropertyPaths(array $propertyPaths) + public function withPropertyPaths(array $propertyPaths): JsonPointer { $new = clone $this; $new->propertyPaths = array_map(function ($p): string { return (string) $p; }, $propertyPaths); @@ -127,18 +115,12 @@ public function withPropertyPaths(array $propertyPaths) return $new; } - /** - * @return string - */ - public function getPropertyPathAsString() + public function getPropertyPathAsString(): string { return rtrim('#/' . implode('/', $this->encodePropertyPaths()), '/'); } - /** - * @return string - */ - public function __toString() + public function __toString(): string { return $this->getFilename() . $this->getPropertyPathAsString(); } @@ -146,17 +128,15 @@ public function __toString() /** * Mark the value at this path as being set from a schema default */ - public function setFromDefault() + public function setFromDefault(): void { $this->fromDefault = true; } /** * Check whether the value at this path was set from a schema default - * - * @return bool */ - public function fromDefault() + public function fromDefault(): bool { return $this->fromDefault; } diff --git a/src/JsonSchema/Exception/ExceptionInterface.php b/src/JsonSchema/Exception/ExceptionInterface.php index c72d4197..5b27c2ae 100644 --- a/src/JsonSchema/Exception/ExceptionInterface.php +++ b/src/JsonSchema/Exception/ExceptionInterface.php @@ -4,6 +4,6 @@ namespace JsonSchema\Exception; -interface ExceptionInterface +interface ExceptionInterface extends \Throwable { } diff --git a/src/JsonSchema/Iterator/ObjectIterator.php b/src/JsonSchema/Iterator/ObjectIterator.php index 9eb121cb..f7634f65 100644 --- a/src/JsonSchema/Iterator/ObjectIterator.php +++ b/src/JsonSchema/Iterator/ObjectIterator.php @@ -100,7 +100,7 @@ public function count(): int /** * Initializer */ - private function initialize() + private function initialize(): void { if (!$this->initialized) { $this->data = $this->buildDataFromObject($this->object); @@ -110,10 +110,8 @@ private function initialize() /** * @param object $object - * - * @return array */ - private function buildDataFromObject($object) + private function buildDataFromObject($object): array { $result = []; @@ -138,10 +136,8 @@ private function buildDataFromObject($object) /** * @param object|array $item - * - * @return array */ - private function getDataFromItem($item) + private function getDataFromItem($item): array { if (!is_object($item) && !is_array($item)) { return []; diff --git a/src/JsonSchema/Rfc3339.php b/src/JsonSchema/Rfc3339.php index 3524f681..ff18a672 100644 --- a/src/JsonSchema/Rfc3339.php +++ b/src/JsonSchema/Rfc3339.php @@ -12,10 +12,8 @@ class Rfc3339 * Try creating a DateTime instance * * @param string $string - * - * @return \DateTime|null */ - public static function createFromString($string) + public static function createFromString($string): ?\DateTime { if (!preg_match(self::REGEX, strtoupper($string), $matches)) { return null; diff --git a/src/JsonSchema/SchemaStorage.php b/src/JsonSchema/SchemaStorage.php index 34f0daae..f70a1ec4 100644 --- a/src/JsonSchema/SchemaStorage.php +++ b/src/JsonSchema/SchemaStorage.php @@ -26,18 +26,12 @@ public function __construct( $this->uriResolver = $uriResolver ?: new UriResolver(); } - /** - * @return UriRetrieverInterface - */ - public function getUriRetriever() + public function getUriRetriever(): UriRetrieverInterface { return $this->uriRetriever; } - /** - * @return UriResolverInterface - */ - public function getUriResolver() + public function getUriResolver(): UriResolverInterface { return $this->uriResolver; } @@ -45,7 +39,7 @@ public function getUriResolver() /** * {@inheritdoc} */ - public function addSchema($id, $schema = null) + public function addSchema($id, $schema = null): void { if (is_null($schema) && $id !== self::INTERNAL_PROVIDED_SCHEMA_URI) { // if the schema was user-provided to Validator and is still null, then assume this is @@ -82,7 +76,7 @@ public function addSchema($id, $schema = null) * @param mixed $schema * @param string $base */ - private function expandRefs(&$schema, $base = null) + private function expandRefs(&$schema, $base = null): void { if (!is_object($schema)) { if (is_array($schema)) { @@ -109,7 +103,7 @@ private function expandRefs(&$schema, $base = null) } /** - * {@inheritdoc} + * @return object|string|false|null */ public function getSchema($id) { @@ -121,7 +115,7 @@ public function getSchema($id) } /** - * {@inheritdoc} + * @return object|false */ public function resolveRef($ref, $resolveStack = []) { @@ -156,7 +150,7 @@ public function resolveRef($ref, $resolveStack = []) } /** - * {@inheritdoc} + * @return object|string|null */ public function resolveRefSchema($refSchema, $resolveStack = []) { diff --git a/src/JsonSchema/SchemaStorageInterface.php b/src/JsonSchema/SchemaStorageInterface.php index eca44283..9d99eaa6 100644 --- a/src/JsonSchema/SchemaStorageInterface.php +++ b/src/JsonSchema/SchemaStorageInterface.php @@ -12,14 +12,14 @@ interface SchemaStorageInterface * @param string $id * @param object $schema */ - public function addSchema($id, $schema = null); + public function addSchema($id, $schema = null): void; /** * Returns schema for given identifier, or null if it does not exist * * @param string $id * - * @return object + * @return object|string|false|null */ public function getSchema($id); @@ -28,7 +28,7 @@ public function getSchema($id); * * @param string $ref * - * @return object + * @return object|false */ public function resolveRef($ref); @@ -37,7 +37,7 @@ public function resolveRef($ref); * * @param mixed $refSchema * - * @return object + * @return object|string|null */ public function resolveRefSchema($refSchema); } diff --git a/src/JsonSchema/Uri/Retrievers/AbstractRetriever.php b/src/JsonSchema/Uri/Retrievers/AbstractRetriever.php index f4ae718a..d554d682 100644 --- a/src/JsonSchema/Uri/Retrievers/AbstractRetriever.php +++ b/src/JsonSchema/Uri/Retrievers/AbstractRetriever.php @@ -21,7 +21,7 @@ abstract class AbstractRetriever implements UriRetrieverInterface /** * Media content type * - * @var string + * @var string|null */ protected $contentType; @@ -30,7 +30,7 @@ abstract class AbstractRetriever implements UriRetrieverInterface * * @see \JsonSchema\Uri\Retrievers\UriRetrieverInterface::getContentType() */ - public function getContentType() + public function getContentType(): ?string { return $this->contentType; } diff --git a/src/JsonSchema/Uri/Retrievers/Curl.php b/src/JsonSchema/Uri/Retrievers/Curl.php index 116607ae..21c9ad70 100644 --- a/src/JsonSchema/Uri/Retrievers/Curl.php +++ b/src/JsonSchema/Uri/Retrievers/Curl.php @@ -36,7 +36,7 @@ public function __construct() * * @see \JsonSchema\Uri\Retrievers\UriRetrieverInterface::retrieve() */ - public function retrieve($uri) + public function retrieve($uri): string { $ch = curl_init(); @@ -61,7 +61,7 @@ public function retrieve($uri) /** * @param string $response cURL HTTP response */ - private function fetchMessageBody($response) + private function fetchMessageBody($response): void { preg_match("/(?:\r\n){2}(.*)$/ms", $response, $match); $this->messageBody = $match[1]; @@ -72,7 +72,7 @@ private function fetchMessageBody($response) * * @return bool Whether the Content-Type header was found or not */ - protected function fetchContentType($response) + protected function fetchContentType($response): bool { if (0 < preg_match("/Content-Type:(\V*)/ims", $response, $match)) { $this->contentType = trim($match[1]); diff --git a/src/JsonSchema/Uri/Retrievers/FileGetContents.php b/src/JsonSchema/Uri/Retrievers/FileGetContents.php index 18fb7fcf..f77ebec2 100644 --- a/src/JsonSchema/Uri/Retrievers/FileGetContents.php +++ b/src/JsonSchema/Uri/Retrievers/FileGetContents.php @@ -27,7 +27,7 @@ class FileGetContents extends AbstractRetriever * * @see \JsonSchema\Uri\Retrievers\UriRetrieverInterface::retrieve() */ - public function retrieve($uri) + public function retrieve($uri): string { $errorMessage = null; set_error_handler(function ($errno, $errstr) use (&$errorMessage) { @@ -68,7 +68,7 @@ public function retrieve($uri) * * @return bool Whether the Content-Type header was found or not */ - private function fetchContentType(array $headers) + private function fetchContentType(array $headers): bool { foreach (array_reverse($headers) as $header) { if ($this->contentType = self::getContentTypeMatchInHeader($header)) { @@ -81,10 +81,8 @@ private function fetchContentType(array $headers) /** * @param string $header - * - * @return string|null */ - protected static function getContentTypeMatchInHeader($header) + protected static function getContentTypeMatchInHeader($header): ?string { if (0 < preg_match("/Content-Type:(\V*)/ims", $header, $match)) { return trim($match[1]); diff --git a/src/JsonSchema/Uri/Retrievers/PredefinedArray.php b/src/JsonSchema/Uri/Retrievers/PredefinedArray.php index 11693002..5fe00b2f 100644 --- a/src/JsonSchema/Uri/Retrievers/PredefinedArray.php +++ b/src/JsonSchema/Uri/Retrievers/PredefinedArray.php @@ -28,9 +28,6 @@ class PredefinedArray extends AbstractRetriever private $schemas; /** - * Constructor - * - * @param array $schemas * @param string $contentType */ public function __construct(array $schemas, $contentType = Validator::SCHEMA_MEDIA_TYPE) @@ -44,7 +41,7 @@ public function __construct(array $schemas, $contentType = Validator::SCHEMA_MED * * @see \JsonSchema\Uri\Retrievers\UriRetrieverInterface::retrieve() */ - public function retrieve($uri) + public function retrieve($uri): string { if (!array_key_exists($uri, $this->schemas)) { throw new \JsonSchema\Exception\ResourceNotFoundException(sprintf( diff --git a/src/JsonSchema/Uri/Retrievers/UriRetrieverInterface.php b/src/JsonSchema/Uri/Retrievers/UriRetrieverInterface.php index 99a2d9e7..07deb60f 100644 --- a/src/JsonSchema/Uri/Retrievers/UriRetrieverInterface.php +++ b/src/JsonSchema/Uri/Retrievers/UriRetrieverInterface.php @@ -24,15 +24,11 @@ interface UriRetrieverInterface * @param string $uri URI that resolves to a JSON schema * * @throws \JsonSchema\Exception\ResourceNotFoundException - * - * @return mixed string|null */ - public function retrieve($uri); + public function retrieve($uri): string; /** * Get media content type - * - * @return string */ - public function getContentType(); + public function getContentType(): ?string; } diff --git a/src/JsonSchema/Uri/UriResolver.php b/src/JsonSchema/Uri/UriResolver.php index 00a47e81..931dbc74 100644 --- a/src/JsonSchema/Uri/UriResolver.php +++ b/src/JsonSchema/Uri/UriResolver.php @@ -25,10 +25,8 @@ class UriResolver implements UriResolverInterface * Parses a URI into five main components * * @param string $uri - * - * @return array */ - public function parse($uri) + public function parse($uri): array { preg_match('|^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?|', (string) $uri, $match); @@ -52,12 +50,8 @@ public function parse($uri) /** * Builds a URI based on n array with the main components - * - * @param array $components - * - * @return string */ - public function generate(array $components) + public function generate(array $components): string { $uri = $components['scheme'] . '://' . $components['authority'] @@ -76,7 +70,7 @@ public function generate(array $components) /** * {@inheritdoc} */ - public function resolve($uri, $baseUri = null) + public function resolve($uri, $baseUri = null): string { // treat non-uri base as local file path if ( @@ -124,7 +118,7 @@ public function resolve($uri, $baseUri = null) * * @return string Merged path */ - public static function combineRelativePathWithBasePath($relativePath, $basePath) + public static function combineRelativePathWithBasePath($relativePath, $basePath): string { $relativePath = self::normalizePath($relativePath); if (!$relativePath) { @@ -164,10 +158,8 @@ public static function combineRelativePathWithBasePath($relativePath, $basePath) * Normalizes a URI path component by removing dot-slash and double slashes * * @param string $path - * - * @return string */ - private static function normalizePath($path) + private static function normalizePath($path): string { $path = preg_replace('|((?parse($uri); diff --git a/src/JsonSchema/Uri/UriRetriever.php b/src/JsonSchema/Uri/UriRetriever.php index 4094cccc..85675018 100644 --- a/src/JsonSchema/Uri/UriRetriever.php +++ b/src/JsonSchema/Uri/UriRetriever.php @@ -59,7 +59,7 @@ class UriRetriever implements BaseUriRetrieverInterface * * @param string $endpoint */ - public function addInvalidContentTypeEndpoint($endpoint) + public function addInvalidContentTypeEndpoint($endpoint): void { $this->allowedInvalidContentTypeEndpoints[] = $endpoint; } @@ -69,20 +69,18 @@ public function addInvalidContentTypeEndpoint($endpoint) * * @param UriRetrieverInterface $uriRetriever * @param string $uri - * - * @return bool|void */ - public function confirmMediaType($uriRetriever, $uri) + public function confirmMediaType($uriRetriever, $uri): ?bool { $contentType = $uriRetriever->getContentType(); if (is_null($contentType)) { // Well, we didn't get an invalid one - return; + return null; } if (in_array($contentType, [Validator::SCHEMA_MEDIA_TYPE, 'application/json'])) { - return; + return null; } foreach ($this->allowedInvalidContentTypeEndpoints as $endpoint) { @@ -99,10 +97,8 @@ public function confirmMediaType($uriRetriever, $uri) * * If none is specified, sets a default FileGetContents retriever and * returns that object. - * - * @return UriRetrieverInterface */ - public function getUriRetriever() + public function getUriRetriever(): UriRetrieverInterface { if (is_null($this->uriRetriever)) { $this->setUriRetriever(new FileGetContents()); @@ -125,7 +121,7 @@ public function getUriRetriever() * * @return object JSON Schema after walking down the fragment pieces */ - public function resolvePointer($jsonSchema, $uri) + public function resolvePointer($jsonSchema, $uri): object { $resolver = new UriResolver(); $parsed = $resolver->parse($uri); @@ -163,7 +159,7 @@ public function resolvePointer($jsonSchema, $uri) /** * {@inheritdoc} */ - public function retrieve($uri, $baseUri = null, $translate = true) + public function retrieve($uri, $baseUri = null, $translate = true): ?object { $resolver = new UriResolver(); $resolvedUri = $fetchUri = $resolver->resolve($uri, $baseUri); @@ -198,7 +194,7 @@ public function retrieve($uri, $baseUri = null, $translate = true) * * @param string $fetchUri Absolute URI * - * @return object JSON schema object + * @return object|string JSON schema object */ protected function loadSchema($fetchUri) { @@ -223,11 +219,9 @@ protected function loadSchema($fetchUri) /** * Set the URI Retriever * - * @param UriRetrieverInterface $uriRetriever - * * @return $this for chaining */ - public function setUriRetriever(UriRetrieverInterface $uriRetriever) + public function setUriRetriever(UriRetrieverInterface $uriRetriever): self { $this->uriRetriever = $uriRetriever; @@ -238,10 +232,8 @@ public function setUriRetriever(UriRetrieverInterface $uriRetriever) * Parses a URI into five main components * * @param string $uri - * - * @return array */ - public function parse($uri) + public function parse($uri): array { preg_match('|^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?|', $uri, $match); @@ -267,12 +259,8 @@ public function parse($uri) /** * Builds a URI based on n array with the main components - * - * @param array $components - * - * @return string */ - public function generate(array $components) + public function generate(array $components): string { $uri = $components['scheme'] . '://' . $components['authority'] @@ -294,10 +282,8 @@ public function generate(array $components) * * @param string $uri Absolute or relative * @param string $baseUri Optional base URI - * - * @return string */ - public function resolve($uri, $baseUri = null) + public function resolve($uri, $baseUri = null): string { $components = $this->parse($uri); $path = $components['path']; @@ -316,10 +302,8 @@ public function resolve($uri, $baseUri = null) /** * @param string $uri - * - * @return bool */ - public function isValid($uri) + public function isValid($uri): bool { $components = $this->parse($uri); @@ -329,7 +313,7 @@ public function isValid($uri) /** * Set a URL translation rule */ - public function setTranslation($from, $to) + public function setTranslation($from, $to): void { $this->translationMap[$from] = $to; } @@ -337,7 +321,7 @@ public function setTranslation($from, $to) /** * Apply URI translation rules */ - public function translate($uri) + public function translate($uri): string { foreach ($this->translationMap as $from => $to) { $uri = preg_replace($from, $to, $uri); diff --git a/src/JsonSchema/UriResolverInterface.php b/src/JsonSchema/UriResolverInterface.php index e80e2be7..3b37b70c 100644 --- a/src/JsonSchema/UriResolverInterface.php +++ b/src/JsonSchema/UriResolverInterface.php @@ -24,5 +24,5 @@ interface UriResolverInterface * * @return string Absolute URI */ - public function resolve($uri, $baseUri = null); + public function resolve($uri, $baseUri = null): string; } diff --git a/src/JsonSchema/UriRetrieverInterface.php b/src/JsonSchema/UriRetrieverInterface.php index 6f503221..1a1428d5 100644 --- a/src/JsonSchema/UriRetrieverInterface.php +++ b/src/JsonSchema/UriRetrieverInterface.php @@ -22,7 +22,7 @@ interface UriRetrieverInterface * @param string $uri JSON Schema URI * @param null|string $baseUri * - * @return object JSON Schema contents + * @return object|null JSON Schema contents */ - public function retrieve($uri, $baseUri = null); + public function retrieve($uri, $baseUri = null): ?object; } diff --git a/src/JsonSchema/Validator.php b/src/JsonSchema/Validator.php index a02c2e5d..5d677189 100644 --- a/src/JsonSchema/Validator.php +++ b/src/JsonSchema/Validator.php @@ -42,12 +42,10 @@ class Validator extends BaseConstraint * @param mixed $schema * @param int $checkMode * - * @return int - * * @phpstan-param int-mask-of $checkMode * @phpstan-return int-mask-of */ - public function validate(&$value, $schema = null, $checkMode = null) + public function validate(&$value, $schema = null, $checkMode = null): int { // reset errors prior to validation $this->reset(); @@ -84,7 +82,7 @@ public function validate(&$value, $schema = null, $checkMode = null) * * @deprecated */ - public function check($value, $schema) + public function check($value, $schema): int { return $this->validate($value, $schema); } @@ -94,7 +92,7 @@ public function check($value, $schema) * * @deprecated */ - public function coerce(&$value, $schema) + public function coerce(&$value, $schema): int { return $this->validate($value, $schema, Constraint::CHECK_MODE_COERCE_TYPES); }