Skip to content

Commit 3ad3449

Browse files
committed
Fix deprecated static in callables
Signed-off-by: George Steel <[email protected]>
1 parent 3573bc3 commit 3ad3449

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/ProblemDetailsResponseFactoryFactory.php

+9-4
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
use Psr\Container\ContainerInterface;
88
use Webmozart\Assert\Assert;
99

10-
use function array_keys;
10+
use function assert;
1111
use function is_bool;
12+
use function is_int;
13+
use function is_string;
1214

1315
class ProblemDetailsResponseFactoryFactory
1416
{
@@ -24,11 +26,14 @@ public function __invoke(ContainerInterface $container): ProblemDetailsResponseF
2426
$problemDetailsConfig = $config['problem-details'] ?? [];
2527
Assert::isArrayAccessible($problemDetailsConfig);
2628
$jsonFlags = $problemDetailsConfig['json_flags'] ?? null;
27-
Assert::nullOrInteger($jsonFlags);
29+
assert($jsonFlags === null || is_int($jsonFlags));
2830
$defaultTypesMap = $problemDetailsConfig['default_types_map'] ?? [];
2931
Assert::isArray($defaultTypesMap);
30-
Assert::allInteger(array_keys($defaultTypesMap));
31-
Assert::allString($defaultTypesMap);
32+
foreach ($defaultTypesMap as $key => $value) {
33+
assert(is_int($key));
34+
assert(is_string($value));
35+
}
36+
3237
/** @psalm-var array<int, string> $defaultTypesMap */
3338

3439
return new ProblemDetailsResponseFactory(

0 commit comments

Comments
 (0)