yiisoft /
demo
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace App\Handler; |
||
| 6 | |||
| 7 | use Psr\Http\Message\ResponseInterface; |
||
|
0 ignored issues
–
show
|
|||
| 8 | use Psr\Http\Message\ServerRequestInterface; |
||
|
0 ignored issues
–
show
The type
Psr\Http\Message\ServerRequestInterface 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 9 | use Psr\Http\Server\RequestHandlerInterface; |
||
|
0 ignored issues
–
show
The type
Psr\Http\Server\RequestHandlerInterface 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 10 | use Yiisoft\DataResponse\DataResponseFactoryInterface; |
||
|
0 ignored issues
–
show
The type
Yiisoft\DataResponse\DataResponseFactoryInterface 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 11 | use Yiisoft\DataResponse\DataResponseFormatterInterface; |
||
|
0 ignored issues
–
show
The type
Yiisoft\DataResponse\Dat...ponseFormatterInterface 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 12 | use Yiisoft\Http\Status; |
||
|
0 ignored issues
–
show
The type
Yiisoft\Http\Status 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 13 | use Yiisoft\Translator\TranslatorInterface; |
||
|
0 ignored issues
–
show
The type
Yiisoft\Translator\TranslatorInterface 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 14 | |||
| 15 | final class NotFoundHandler implements RequestHandlerInterface |
||
| 16 | { |
||
| 17 | public function __construct( |
||
| 18 | private DataResponseFormatterInterface $formatter, |
||
| 19 | private DataResponseFactoryInterface $dataResponseFactory, |
||
| 20 | private TranslatorInterface $translator, |
||
| 21 | ) { |
||
| 22 | } |
||
| 23 | |||
| 24 | public function handle(ServerRequestInterface $request): ResponseInterface |
||
| 25 | { |
||
| 26 | return $this->formatter->format( |
||
| 27 | $this->dataResponseFactory->createResponse( |
||
| 28 | $this->translator->translate('404.title'), |
||
| 29 | Status::NOT_FOUND, |
||
| 30 | ) |
||
| 31 | ); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths