Skip to content

Commit c6867ab

Browse files
committed
cs: various fixes
1 parent cd01e04 commit c6867ab

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

docs/public/index.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
require __DIR__.'/../vendor/autoload.php';
1818

1919
use ApiPlatform\Playground\Kernel;
20+
use RuntimeException;
2021

2122
if (!($guide = $_SERVER['APP_GUIDE'] ?? $_ENV['APP_GUIDE'] ?? null)) {
22-
throw new \RuntimeException('No guide.');
23+
throw new RuntimeException('No guide.');
2324
}
2425

2526
$app = function (array $context) use ($guide) {

src/deprecation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
declare(strict_types=1);
1313

1414
$deprecatedClassesWithAliases = [
15-
\ApiPlatform\HttpCache\EventListener\AddHeadersListener::class => \ApiPlatform\Symfony\EventListener\AddHeadersListener::class,
16-
\ApiPlatform\HttpCache\EventListener\AddTagsListener::class => \ApiPlatform\Symfony\EventListener\AddTagsListener::class,
15+
ApiPlatform\HttpCache\EventListener\AddHeadersListener::class => \ApiPlatform\Symfony\EventListener\AddHeadersListener::class,
16+
ApiPlatform\HttpCache\EventListener\AddTagsListener::class => \ApiPlatform\Symfony\EventListener\AddTagsListener::class,
1717
];
1818

1919
spl_autoload_register(function ($className) use ($deprecatedClassesWithAliases): void {

tests/State/RespondProcessorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function testRedirectToOperation(): void
6767
$iriConverter = $this->prophesize(IriConverterInterface::class);
6868
$iriConverter
6969
->getIriFromResource(Argument::cetera())
70-
->will(static function (array $args): ?string {
70+
->will(static function (array $args): string {
7171
return ($args[2] ?? null)?->getUriTemplate() ?? '/default';
7272
});
7373

0 commit comments

Comments
 (0)