| Total Complexity | 3 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | final class AuthController |
||
| 18 | { |
||
| 19 | private ResponseFactory $responseFactory; |
||
| 20 | private UserService $userService; |
||
| 21 | |||
| 22 | public function __construct( |
||
| 23 | ResponseFactory $responseFactory, |
||
| 24 | UserService $userService |
||
| 25 | ) { |
||
| 26 | $this->responseFactory = $responseFactory; |
||
| 27 | $this->userService = $userService; |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @OA\Post( |
||
| 32 | * tags={"auth"}, |
||
| 33 | * path="/auth", |
||
| 34 | * summary="Authenticate by token", |
||
| 35 | * description="", |
||
| 36 | * @OA\Response(response="200", description="Success") |
||
| 37 | * ) |
||
| 38 | */ |
||
| 39 | public function login(AuthRequest $request): ResponseInterface |
||
| 40 | { |
||
| 41 | return $this->responseFactory->createResponse( |
||
| 42 | [ |
||
| 43 | 'token' => $this->userService->login( |
||
| 44 | $request->getLogin(), |
||
| 45 | $request->getPassword() |
||
| 46 | )->getToken(), |
||
| 47 | ] |
||
| 48 | ); |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @OA\Post( |
||
| 53 | * tags={"auth"}, |
||
| 54 | * path="/logout", |
||
| 55 | * summary="Logout", |
||
| 56 | * description="", |
||
| 57 | * @OA\Response(response="200", description="Success") |
||
| 58 | * ) |
||
| 59 | */ |
||
| 60 | public function logout(): ResponseInterface |
||
| 64 | } |
||
| 65 | } |
||
| 66 |
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