| Conditions | 3 |
| Paths | 5 |
| Total Lines | 24 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function __invoke(string $context, array $globals, array $server): int |
||
| 30 | { |
||
| 31 | $tmpDir = dirname(__DIR__, 2) . '/tests/tmp'; |
||
| 32 | $app = Injector::getInstance('BEAR\Package\Compiler', $context, $tmpDir)->getInstance(AppInterface::class); |
||
| 33 | assert($app instanceof AppInterface); |
||
| 34 | if ($app->httpCache->isNotModified($server)) { |
||
| 35 | $app->httpCache->transfer(); |
||
| 36 | |||
| 37 | return 0; |
||
| 38 | } |
||
| 39 | |||
| 40 | $request = $app->router->match($globals, $server); |
||
| 41 | try { |
||
| 42 | $response = $app->resource->{$request->method}->uri($request->path)($request->query); |
||
| 43 | assert($response instanceof ResourceObject); |
||
| 44 | $response->transfer($app->responder, $server); |
||
| 45 | |||
| 46 | return 0; |
||
| 47 | } catch (Throwable $e) { |
||
| 48 | $app->throwableHandler->handle($e, $request)->transfer(); |
||
| 49 | |||
| 50 | return 1; |
||
| 51 | } |
||
| 52 | } |
||
| 53 | } |
||
| 54 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.