@@ -3,8 +3,6 @@ |
||
3 | 3 | |
4 | 4 | namespace Oc\Security; |
5 | 5 | |
6 | -use Doctrine\ORM\EntityManagerInterface; |
|
7 | -use Oc\User\UserEntity; |
|
8 | 6 | use Oc\User\UserRepository; |
9 | 7 | use Symfony\Component\HttpFoundation\RedirectResponse; |
10 | 8 | use Symfony\Component\HttpFoundation\Request; |
@@ -5,9 +5,9 @@ discard block |
||
5 | 5 | use Symfony\Component\ErrorHandler\Debug; |
6 | 6 | use Symfony\Component\HttpFoundation\Request; |
7 | 7 | |
8 | -require dirname(__DIR__).'/vendor/autoload.php'; |
|
8 | +require dirname(__DIR__) . '/vendor/autoload.php'; |
|
9 | 9 | |
10 | -(new Dotenv())->bootEnv(dirname(__DIR__).'/.env'); |
|
10 | +(new Dotenv())->bootEnv(dirname(__DIR__) . '/.env'); |
|
11 | 11 | |
12 | 12 | if ($_SERVER['APP_DEBUG']) { |
13 | 13 | umask(0000); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | Request::setTrustedHosts([$trustedHosts]); |
24 | 24 | } |
25 | 25 | |
26 | -$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); |
|
26 | +$kernel = new Kernel($_SERVER['APP_ENV'], (bool)$_SERVER['APP_DEBUG']); |
|
27 | 27 | $request = Request::createFromGlobals(); |
28 | 28 | $response = $kernel->handle($request); |
29 | 29 | $response->send(); |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $databaseArray |
94 | 94 | ); |
95 | 95 | |
96 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
96 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
97 | 97 | |
98 | 98 | return $entity; |
99 | 99 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | ['id' => $entity->id] |
118 | 118 | ); |
119 | 119 | |
120 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
120 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
121 | 121 | |
122 | 122 | return $entity; |
123 | 123 | } |
@@ -189,13 +189,13 @@ discard block |
||
189 | 189 | public function getEntityFromDatabaseArray(array $data): UserEntity |
190 | 190 | { |
191 | 191 | $entity = new UserEntity(); |
192 | - $entity->id = (int) $data['user_id']; |
|
192 | + $entity->id = (int)$data['user_id']; |
|
193 | 193 | $entity->username = $data['username']; |
194 | 194 | $entity->password = $data['password']; |
195 | 195 | $entity->email = $data['email']; |
196 | - $entity->latitude = (double) $data['latitude']; |
|
197 | - $entity->longitude = (double) $data['longitude']; |
|
198 | - $entity->isActive = (bool) $data['is_active_flag']; |
|
196 | + $entity->latitude = (double)$data['latitude']; |
|
197 | + $entity->longitude = (double)$data['longitude']; |
|
198 | + $entity->isActive = (bool)$data['is_active_flag']; |
|
199 | 199 | $entity->firstname = $data['first_name']; |
200 | 200 | $entity->lastname = $data['last_name']; |
201 | 201 | $entity->country = $data['country']; |
@@ -14,19 +14,19 @@ |
||
14 | 14 | protected function configureContainer(ContainerConfigurator $container): void |
15 | 15 | { |
16 | 16 | $container->import('../config/{packages}/*.php'); |
17 | - $container->import('../config/{packages}/'.$this->environment.'/*.php'); |
|
17 | + $container->import('../config/{packages}/' . $this->environment . '/*.php'); |
|
18 | 18 | |
19 | - if (is_file($path = \dirname(__DIR__).'/config/services.php')) { |
|
19 | + if (is_file($path = \dirname(__DIR__) . '/config/services.php')) { |
|
20 | 20 | (require $path)($container->withPath($path), $this); |
21 | 21 | } |
22 | 22 | } |
23 | 23 | |
24 | 24 | protected function configureRoutes(RoutingConfigurator $routes): void |
25 | 25 | { |
26 | - $routes->import('../config/{routes}/'.$this->environment.'/*.php'); |
|
26 | + $routes->import('../config/{routes}/' . $this->environment . '/*.php'); |
|
27 | 27 | $routes->import('../config/{routes}/*.php'); |
28 | 28 | |
29 | - if (is_file($path = \dirname(__DIR__).'/config/routes.php')) { |
|
29 | + if (is_file($path = \dirname(__DIR__) . '/config/routes.php')) { |
|
30 | 30 | (require $path)($routes->withPath($path), $this); |
31 | 31 | } |
32 | 32 | } |
@@ -2,10 +2,10 @@ |
||
2 | 2 | |
3 | 3 | use Symfony\Component\Dotenv\Dotenv; |
4 | 4 | |
5 | -require dirname(__DIR__).'/vendor/autoload.php'; |
|
5 | +require dirname(__DIR__) . '/vendor/autoload.php'; |
|
6 | 6 | |
7 | -if (file_exists(dirname(__DIR__).'/config/bootstrap.php')) { |
|
8 | - require dirname(__DIR__).'/config/bootstrap.php'; |
|
7 | +if (file_exists(dirname(__DIR__) . '/config/bootstrap.php')) { |
|
8 | + require dirname(__DIR__) . '/config/bootstrap.php'; |
|
9 | 9 | } elseif (method_exists(Dotenv::class, 'bootEnv')) { |
10 | - (new Dotenv())->bootEnv(dirname(__DIR__).'/.env'); |
|
10 | + (new Dotenv())->bootEnv(dirname(__DIR__) . '/.env'); |
|
11 | 11 | } |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (file_exists(dirname(__DIR__).'/var/cache/prod/Oc_KernelProdContainer.preload.php')) { |
|
4 | - require dirname(__DIR__).'/var/cache/prod/Oc_KernelProdContainer.preload.php'; |
|
3 | +if (file_exists(dirname(__DIR__) . '/var/cache/prod/Oc_KernelProdContainer.preload.php')) { |
|
4 | + require dirname(__DIR__) . '/var/cache/prod/Oc_KernelProdContainer.preload.php'; |
|
5 | 5 | } |
@@ -2,6 +2,6 @@ |
||
2 | 2 | |
3 | 3 | use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; |
4 | 4 | |
5 | -return function (RoutingConfigurator $routes) { |
|
5 | +return function(RoutingConfigurator $routes) { |
|
6 | 6 | |
7 | 7 | }; |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
6 | 6 | |
7 | -return static function (ContainerConfigurator $containerConfigurator): void { |
|
7 | +return static function(ContainerConfigurator $containerConfigurator): void { |
|
8 | 8 | $containerConfigurator->extension('framework', [ |
9 | 9 | 'notifier' => [ |
10 | 10 | 'channel_policy' => [ |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
6 | 6 | |
7 | -return static function (ContainerConfigurator $containerConfigurator): void { |
|
7 | +return static function(ContainerConfigurator $containerConfigurator): void { |
|
8 | 8 | $containerConfigurator->extension('framework', [ |
9 | 9 | 'test' => true |
10 | 10 | ]); |