Passed
Push — master ( 519e38...1265b7 )
by Melech
01:25
created

RouteNotMatchedHandler::routeNotMatched()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 5
nc 2
nop 2
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Valkyrja Framework package.
7
 *
8
 * (c) Melech Mizrachi <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Valkyrja\Cli\Middleware\Handler;
15
16
use Override;
0 ignored issues
show
Bug introduced by
The type Override was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
17
use Valkyrja\Cli\Interaction\Input\Contract\InputContract;
18
use Valkyrja\Cli\Interaction\Output\Contract\OutputContract;
19
use Valkyrja\Cli\Middleware\Contract\RouteNotMatchedMiddlewareContract;
20
use Valkyrja\Cli\Middleware\Handler\Abstract\Handler;
21
use Valkyrja\Cli\Middleware\Handler\Contract\RouteNotMatchedHandlerContract as Contract;
22
23
/**
24
 * @extends Handler<RouteNotMatchedMiddlewareContract>
25
 */
26
class RouteNotMatchedHandler extends Handler implements Contract
27
{
28
    /**
29
     * @inheritDoc
30
     */
31
    #[Override]
32
    public function routeNotMatched(InputContract $input, OutputContract $output): OutputContract
33
    {
34
        $next = $this->next;
35
36
        return $next !== null
37
            ? $this->getMiddleware($next)->routeNotMatched($input, $output, $this)
38
            : $output;
39
    }
40
}
41