yiisoft /
demo
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace App\Service; |
||
| 6 | |||
| 7 | use Psr\Http\Message\ResponseFactoryInterface; |
||
|
0 ignored issues
–
show
|
|||
| 8 | use Psr\Http\Message\ResponseInterface; |
||
|
0 ignored issues
–
show
The type
Psr\Http\Message\ResponseInterface 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 Yiisoft\Http\Header; |
||
|
0 ignored issues
–
show
The type
Yiisoft\Http\Header 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\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...
|
|||
| 11 | use Yiisoft\Router\UrlGeneratorInterface; |
||
|
0 ignored issues
–
show
The type
Yiisoft\Router\UrlGeneratorInterface 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 | |||
| 13 | final class WebControllerService |
||
| 14 | { |
||
| 15 | public function __construct( |
||
| 16 | private ResponseFactoryInterface $responseFactory, |
||
| 17 | private UrlGeneratorInterface $urlGenerator |
||
| 18 | ) { |
||
| 19 | } |
||
| 20 | |||
| 21 | public function getRedirectResponse(string $url): ResponseInterface |
||
| 22 | { |
||
| 23 | return $this->responseFactory |
||
| 24 | ->createResponse(Status::FOUND) |
||
| 25 | ->withHeader(Header::LOCATION, $this->urlGenerator->generate($url)); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function getNotFoundResponse(): ResponseInterface |
||
| 29 | { |
||
| 30 | return $this->responseFactory |
||
| 31 | ->createResponse(Status::NOT_FOUND); |
||
| 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