@@ -142,7 +142,7 @@ |
||
142 | 142 | |
143 | 143 | return $this->error( |
144 | 144 | $e->getMessage(), |
145 | - $e->getFile() .':'. $e->getLine(), |
|
145 | + $e->getFile() . ':' . $e->getLine(), |
|
146 | 146 | $e->getCode(), |
147 | 147 | 500 |
148 | 148 | ); |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | return [ |
14 | 14 | 'doctrine' => autowire(ManagerRegistry::class), |
15 | 15 | |
16 | - 'doctrine.types' => [], |
|
16 | + 'doctrine.types' => [ ], |
|
17 | 17 | |
18 | 18 | 'doctrine.configuration' => [ |
19 | 19 | 'master' => [ |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | ], |
41 | 41 | ], |
42 | 42 | |
43 | - 'doctrine.configuration.master.connection' => ['url' => env('DB_MASTER_URL')], |
|
43 | + 'doctrine.configuration.master.connection' => [ 'url' => env('DB_MASTER_URL') ], |
|
44 | 44 | 'doctrine.configuration.master.metadata_sources' => get('doctrine.configuration.default.metadata_sources'), |
45 | 45 | 'doctrine.configuration.master.metadata_cache' => get('doctrine.configuration.default.metadata_cache'), |
46 | 46 | 'doctrine.configuration.master.query_cache' => get('doctrine.configuration.default.query_cache'), |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | 'doctrine.configuration.master.proxy_auto_generate' => get('doctrine.configuration.default.proxy_auto_generate'), |
51 | 51 | 'doctrine.configuration.master.sql_logger' => get('doctrine.configuration.default.sql_logger'), |
52 | 52 | |
53 | - 'doctrine.configuration.slave.connection' => ['url' => env('DB_SLAVE_URL')], |
|
53 | + 'doctrine.configuration.slave.connection' => [ 'url' => env('DB_SLAVE_URL') ], |
|
54 | 54 | 'doctrine.configuration.slave.metadata_sources' => get('doctrine.configuration.default.metadata_sources'), |
55 | 55 | 'doctrine.configuration.slave.metadata_cache' => get('doctrine.configuration.default.metadata_cache'), |
56 | 56 | 'doctrine.configuration.slave.query_cache' => get('doctrine.configuration.default.query_cache'), |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | 'doctrine.configuration.slave.proxy_auto_generate' => get('doctrine.configuration.default.proxy_auto_generate'), |
61 | 61 | 'doctrine.configuration.slave.sql_logger' => get('doctrine.configuration.default.sql_logger'), |
62 | 62 | |
63 | - 'doctrine.configuration.default.metadata_sources' => [string('{app.root}/src/Entity')], |
|
63 | + 'doctrine.configuration.default.metadata_sources' => [ string('{app.root}/src/Entity') ], |
|
64 | 64 | 'doctrine.configuration.default.metadata_cache' => get('doctrine.configuration.default.default_cache'), |
65 | 65 | 'doctrine.configuration.default.query_cache' => get('doctrine.configuration.default.default_cache'), |
66 | 66 | 'doctrine.configuration.default.result_cache' => get('doctrine.configuration.default.default_cache'), |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | 'doctrine.configuration.default.proxy_auto_generate' => true, |
71 | 71 | 'doctrine.configuration.default.sql_logger' => null, |
72 | 72 | |
73 | - 'commands' => decorate(function ($previous, $container) { |
|
73 | + 'commands' => decorate(function($previous, $container) { |
|
74 | 74 | // Proxy Commands for the Doctrine Library... |
75 | 75 | $additional = $container->get('doctrine')->getCommands(); |
76 | 76 |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | use function DI\string; |
10 | 10 | |
11 | 11 | return [ |
12 | - 'router' => factory(function ($container) { |
|
12 | + 'router' => factory(function($container) { |
|
13 | 13 | $loader = new DescriptorDirectoryLoader(); |
14 | 14 | $loader->setContainer($container); |
15 | 15 | $loader->setCache($container->get('router.configuration.metadata_cache')); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | return $router; |
22 | 22 | }), |
23 | 23 | |
24 | - 'router.configuration.metadata_cache' => factory(function () { |
|
24 | + 'router.configuration.metadata_cache' => factory(function() { |
|
25 | 25 | return new Cache(new ArrayAdapter()); |
26 | 26 | }), |
27 | 27 |
@@ -3,12 +3,12 @@ |
||
3 | 3 | use Doctrine\Common\Annotations\AnnotationRegistry; |
4 | 4 | use Symfony\Component\Dotenv\Dotenv; |
5 | 5 | |
6 | -(function () { |
|
6 | +(function() { |
|
7 | 7 | chdir(__DIR__ . '/..'); |
8 | 8 | setlocale(LC_ALL, 'C.UTF-8'); |
9 | 9 | |
10 | 10 | // enables strict development mode... |
11 | - set_error_handler(function ($severity, $message, $file, $line) { |
|
11 | + set_error_handler(function($severity, $message, $file, $line) { |
|
12 | 12 | throw new ErrorException($message, 0, $severity, $file, $line); |
13 | 13 | }); |
14 | 14 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | use DI\Container; |
4 | 4 | use DI\ContainerBuilder; |
5 | 5 | |
6 | -return (function () : Container { |
|
6 | +return (function() : Container { |
|
7 | 7 | $env = getenv('APP_ENV') ?: 'dev'; |
8 | 8 | |
9 | 9 | $builder = new ContainerBuilder(); |
@@ -7,7 +7,7 @@ |
||
7 | 7 | use function DI\factory; |
8 | 8 | |
9 | 9 | return [ |
10 | - 'validator' => factory(function ($container) : ValidatorInterface { |
|
10 | + 'validator' => factory(function($container) : ValidatorInterface { |
|
11 | 11 | return Validation::createValidatorBuilder() |
12 | 12 | ->enableAnnotationMapping(true) |
13 | 13 | ->addDefaultDoctrineAnnotationReader() |
@@ -79,8 +79,8 @@ |
||
79 | 79 | public function handle(ServerRequestInterface $request) : ResponseInterface |
80 | 80 | { |
81 | 81 | $q = $request->getQueryParams(); |
82 | - $limit = (int) ($q['limit'] ?? 100); |
|
83 | - $offset = (int) ($q['offset'] ?? 0); |
|
82 | + $limit = (int) ($q[ 'limit' ] ?? 100); |
|
83 | + $offset = (int) ($q[ 'offset' ] ?? 0); |
|
84 | 84 | |
85 | 85 | $entries = $this->container->get('entryManager')->getList($limit, $offset); |
86 | 86 | $total = $this->container->get('entryManager')->countAll(); |
@@ -66,7 +66,7 @@ |
||
66 | 66 | ->getRepository(Entry::class) |
67 | 67 | ->find($id); |
68 | 68 | |
69 | - if (! ($entry instanceof Entry)) { |
|
69 | + if (!($entry instanceof Entry)) { |
|
70 | 70 | throw new EntityNotFoundException(); |
71 | 71 | } |
72 | 72 |
@@ -31,9 +31,9 @@ |
||
31 | 31 | */ |
32 | 32 | public function listSerialize(Entry ...$entries) : array |
33 | 33 | { |
34 | - $result = []; |
|
34 | + $result = [ ]; |
|
35 | 35 | foreach ($entries as $entry) { |
36 | - $result[] = $this->serialize($entry); |
|
36 | + $result[ ] = $this->serialize($entry); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | return $result; |