@@ -37,7 +37,7 @@ |
||
37 | 37 | { |
38 | 38 | $cache = new FilesystemAdapter(); |
39 | 39 | |
40 | - $count = $cache->get('operations_count', function (ItemInterface $item) { |
|
40 | + $count = $cache->get('operations_count', function(ItemInterface $item) { |
|
41 | 41 | $item->expiresAfter(3600); |
42 | 42 | |
43 | 43 | return $this->countAll(); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | |
24 | 24 | public function findItems() |
25 | 25 | { |
26 | - return $this->findBy([], ['sort_order' => 'ASC']); |
|
26 | + return $this->findBy([ ], [ 'sort_order' => 'ASC' ]); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | public function reorderItems(array $items): void |
@@ -40,7 +40,7 @@ |
||
40 | 40 | { |
41 | 41 | $cache = new FilesystemAdapter(); |
42 | 42 | |
43 | - $count = $cache->get('properties_count', function (ItemInterface $item) { |
|
43 | + $count = $cache->get('properties_count', function(ItemInterface $item) { |
|
44 | 44 | $item->expiresAfter(3600); |
45 | 45 | |
46 | 46 | return $this->countAll(); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | { |
32 | 32 | $contents = require $this->getProjectDir().'/config/bundles.php'; |
33 | 33 | foreach ($contents as $class => $envs) { |
34 | - if ($envs[$this->environment] ?? $envs['all'] ?? false) { |
|
34 | + if ($envs[ $this->environment ] ?? $envs[ 'all' ] ?? false) { |
|
35 | 35 | yield new $class(); |
36 | 36 | } |
37 | 37 | } |
@@ -6,21 +6,21 @@ |
||
6 | 6 | |
7 | 7 | require dirname(__DIR__).'/config/bootstrap.php'; |
8 | 8 | |
9 | -if ($_SERVER['APP_DEBUG']) { |
|
9 | +if ($_SERVER[ 'APP_DEBUG' ]) { |
|
10 | 10 | umask(0000); |
11 | 11 | |
12 | 12 | Debug::enable(); |
13 | 13 | } |
14 | 14 | |
15 | -if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) { |
|
15 | +if ($trustedProxies = $_SERVER[ 'TRUSTED_PROXIES' ] ?? $_ENV[ 'TRUSTED_PROXIES' ] ?? false) { |
|
16 | 16 | Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST); |
17 | 17 | } |
18 | 18 | |
19 | -if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) { |
|
20 | - Request::setTrustedHosts([$trustedHosts]); |
|
19 | +if ($trustedHosts = $_SERVER[ 'TRUSTED_HOSTS' ] ?? $_ENV[ 'TRUSTED_HOSTS' ] ?? false) { |
|
20 | + Request::setTrustedHosts([ $trustedHosts ]); |
|
21 | 21 | } |
22 | 22 | |
23 | -$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); |
|
23 | +$kernel = new Kernel($_SERVER[ 'APP_ENV' ], (bool) $_SERVER[ 'APP_DEBUG' ]); |
|
24 | 24 | $request = Request::createFromGlobals(); |
25 | 25 | $response = $kernel->handle($request); |
26 | 26 | $response->send(); |