10000 cs fixes · brefphp/symfony-bridge@453153c · GitHub
[go: up one dir, main page]

Skip to content

Commit 453153c

Browse files
committed
cs fixes
1 parent a249014 commit 453153c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/HandlerResolver.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44

55
use Bref\Runtime\FileHandlerLocator;
66
use Bref\SymfonyBridge\Http\KernelAdapter;
7+
use Bref\SymfonyBridge\Runtime\BrefRuntime;
78
use Exception;
89
use Psr\Container\ContainerInterface;
910
use Symfony\Component\HttpKernel\HttpKernelInterface;
1011
use Symfony\Component\HttpKernel\KernelInterface;
12+
use Symfony\Component\Runtime\SymfonyRuntime;
1113

1214
/**
1315
* This class resolves handlers.
@@ -113,12 +115,12 @@ private function symfonyContainer(?string $bootstrapFile = null): ContainerInter
113115
if ($projectDir) {
114116
$options['project_dir'] = $projectDir;
115117
}
116-
$runtimeClass = $_SERVER['APP_RUNTIME'] ?? $_ENV['APP_RUNTIME'] ?? '\\Bref\\SymfonyBridge\\Runtime\\BrefRuntime';
118+
119+
$runtimeClass = $_SERVER['APP_RUNTIME'] ?? $_ENV['APP_RUNTIME'] ?? BrefRuntime::class;
117120
$runtime = new $runtimeClass($options);
118-
if (!$runtime instanceof \Symfony\Component\Runtime\SymfonyRuntime) {
119-
throw new \RuntimeException("The runtime class '$runtimeClass' must extend Symfony\Component\Runtime\SymfonyRuntime.");
121+
if (!$runtime instanceof SymfonyRuntime) {
122+
throw new \RuntimeException(sprintf('The runtime class "%s" must extend Symfony\Component\Runtime\SymfonyRuntime.', $runtimeClass));
120123
}
121-
}
122124

123125
[$app, $args] = $runtime
124126
->getResolver($app)

0 commit comments

Comments
 (0)
0