ControleOnline /
api-platform-users
| 1 | <?php |
||
| 2 | |||
| 3 | namespace ControleOnline\Controller; |
||
| 4 | |||
| 5 | use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; |
||
|
0 ignored issues
–
show
|
|||
| 6 | use Doctrine\ORM\EntityManagerInterface; |
||
|
0 ignored issues
–
show
The type
Doctrine\ORM\EntityManagerInterface 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...
|
|||
| 7 | use Symfony\Component\HttpFoundation\Request; |
||
|
0 ignored issues
–
show
The type
Symfony\Component\HttpFoundation\Request 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...
|
|||
| 8 | use ControleOnline\Entity\User; |
||
| 9 | use ControleOnline\Entity\People; |
||
|
0 ignored issues
–
show
The type
ControleOnline\Entity\People 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 ControleOnline\Service\PeopleRoleService; |
||
|
0 ignored issues
–
show
The type
ControleOnline\Service\PeopleRoleService 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 ControleOnline\Service\UserService; |
||
| 12 | |||
| 13 | class SecurityController extends AbstractController |
||
| 14 | { |
||
| 15 | |||
| 16 | |||
| 17 | public function __construct( |
||
| 18 | private PeopleRoleService $roleService, |
||
| 19 | private EntityManagerInterface $manager, |
||
| 20 | protected UserService $userService |
||
| 21 | ) {} |
||
| 22 | |||
| 23 | public function __invoke(Request $request) |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * @var \ControleOnline\Entity\User |
||
| 27 | */ |
||
| 28 | $user = $this->getUser(); |
||
| 29 | |||
| 30 | if ($user === null) |
||
| 31 | return $this->json([ |
||
| 32 | 'error' => 'User not found' |
||
| 33 | ]); |
||
| 34 | |||
| 35 | return $this->json($this->userService->getUserSession($user)); |
||
| 36 | |||
| 37 | } |
||
| 38 | } |
||
| 39 |
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