@@ -27,13 +27,13 @@ discard block |
||
27 | 27 | * |
28 | 28 | * @var Request |
29 | 29 | */ |
30 | - private $request = null; |
|
30 | + private $request = null; |
|
31 | 31 | |
32 | 32 | |
33 | 33 | |
34 | 34 | public function __construct(EntityManagerInterface $manager) |
35 | 35 | { |
36 | - $this->manager = $manager; |
|
36 | + $this->manager = $manager; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | public function __invoke(People $data, Request $request): JsonResponse |
@@ -75,12 +75,12 @@ discard block |
||
75 | 75 | throw new \InvalidArgumentException('Document id is not defined'); |
76 | 76 | } |
77 | 77 | |
78 | - $users = $this->manager->getRepository(User::class)->findBy(['people' => $person]); |
|
78 | + $users = $this->manager->getRepository(User::class)->findBy(['people' => $person]); |
|
79 | 79 | if (count($users) == 1) { |
80 | 80 | throw new \InvalidArgumentException('Deve existir pelo menos um usuário'); |
81 | 81 | } |
82 | 82 | |
83 | - $user = $this->manager->getRepository(User::class)->findOneBy(['id' => $payload['id'], 'people' => $person]); |
|
83 | + $user = $this->manager->getRepository(User::class)->findOneBy(['id' => $payload['id'], 'people' => $person]); |
|
84 | 84 | if (!$user instanceof User) { |
85 | 85 | throw new \InvalidArgumentException('Person user was not found'); |
86 | 86 | } |