You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (null !== $default && !\is_scalar($default) && !$defaultinstanceof \Stringable) {
32
-
thrownew \InvalidArgumentException(sprintf('Expected a scalar value as a 2nd argument to "%s()", "%s" given.', __METHOD__, get_debug_type($default)));
32
+
thrownew \InvalidArgumentException(\sprintf('Expected a scalar value as a 2nd argument to "%s()", "%s" given.', __METHOD__, get_debug_type($default)));
thrownew \InvalidArgumentException(sprintf('Expected a scalar, or an array as a 2nd argument to "%s()", "%s" given.', __METHOD__, get_debug_type($value)));
71
+
thrownew \InvalidArgumentException(\sprintf('Expected a scalar, or an array as a 2nd argument to "%s()", "%s" given.', __METHOD__, get_debug_type($value)));
72
72
}
73
73
74
74
$this->parameters[$key] = $value;
@@ -114,11 +114,11 @@ public function filter(string $key, mixed $default = null, int $filter = \FILTER
thrownewBadRequestException(sprintf('Input value "%s" contains an array, but "FILTER_REQUIRE_ARRAY" or "FILTER_FORCE_ARRAY" flags were not set.', $key));
117
+
thrownewBadRequestException(\sprintf('Input value "%s" contains an array, but "FILTER_REQUIRE_ARRAY" or "FILTER_FORCE_ARRAY" flags were not set.', $key));
thrownew \InvalidArgumentException(sprintf('A Closure must be passed to "%s()" when FILTER_CALLBACK is used, "%s" given.', __METHOD__, get_debug_type($options['options'] ?? null)));
121
+
thrownew \InvalidArgumentException(\sprintf('A Closure must be passed to "%s()" when FILTER_CALLBACK is used, "%s" given.', __METHOD__, get_debug_type($options['options'] ?? null)));
122
122
}
123
123
124
124
$options['flags'] ??= 0;
@@ -131,6 +131,6 @@ public function filter(string $key, mixed $default = null, int $filter = \FILTER
131
131
return$value;
132
132
}
133
133
134
-
thrownewBadRequestException(sprintf('Input value "%s" is invalid and flag "FILTER_NULL_ON_FAILURE" was not set.', $key));
134
+
thrownewBadRequestException(\sprintf('Input value "%s" is invalid and flag "FILTER_NULL_ON_FAILURE" was not set.', $key));
Copy file name to clipboardexpand all lines: JsonResponse.php
+2-2
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ public function __construct(mixed $data = null, int $status = 200, array $header
41
41
parent::__construct('', $status, $headers);
42
42
43
43
if ($json && !\is_string($data) && !is_numeric($data) && !\is_callable([$data, '__toString'])) {
44
-
thrownew \TypeError(sprintf('"%s": If $json is set to true, argument $data must be a string or object implementing __toString(), "%s" given.', __METHOD__, get_debug_type($data)));
44
+
thrownew \TypeError(\sprintf('"%s": If $json is set to true, argument $data must be a string or object implementing __toString(), "%s" given.', __METHOD__, get_debug_type($data)));
45
45
}
46
46
47
47
$data ??= new \ArrayObject();
@@ -173,7 +173,7 @@ protected function update(): static
173
173
// Not using application/javascript for compatibility reasons with older browsers.
thrownew \InvalidArgumentException(sprintf('A Closure must be passed to "%s()" when FILTER_CALLBACK is used, "%s" given.', __METHOD__, get_debug_type($options['options'] ?? null)));
206
+
thrownew \InvalidArgumentException(\sprintf('A Closure must be passed to "%s()" when FILTER_CALLBACK is used, "%s" given.', __METHOD__, get_debug_type($options['options'] ?? null)));
207
207
}
208
208
209
209
$options['flags'] ??= 0;
@@ -216,7 +216,7 @@ public function filter(string $key, mixed $default = null, int $filter = \FILTER
216
216
return$value;
217
217
}
218
218
219
-
thrownew \UnexpectedValueException(sprintf('Parameter value "%s" is invalid and flag "FILTER_NULL_ON_FAILURE" was not set.', $key));
219
+
thrownew \UnexpectedValueException(\sprintf('Parameter value "%s" is invalid and flag "FILTER_NULL_ON_FAILURE" was not set.', $key));
0 commit comments