@@ -37,7 +37,7 @@ |
||
| 37 | 37 | { |
| 38 | 38 | $cache = new FilesystemAdapter(); |
| 39 | 39 | |
| 40 | - $count = $cache->get('categories_count', function (ItemInterface $item) { |
|
| 40 | + $count = $cache->get('categories_count', function(ItemInterface $item) { |
|
| 41 | 41 | $item->expiresAfter(3600); |
| 42 | 42 | |
| 43 | 43 | return $this->countAll(); |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | { |
| 38 | 38 | $cache = new FilesystemAdapter(); |
| 39 | 39 | |
| 40 | - $count = $cache->get('localities_count', function (ItemInterface $item) { |
|
| 40 | + $count = $cache->get('localities_count', function(ItemInterface $item) { |
|
| 41 | 41 | $item->expiresAfter(3600); |
| 42 | 42 | |
| 43 | 43 | return $this->countAll(); |
@@ -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 |
@@ -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(); |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | { |
| 13 | 13 | public function load(ObjectManager $manager): void |
| 14 | 14 | { |
| 15 | - foreach ($this->getLocalityData() as [$slug, $name]) { |
|
| 15 | + foreach ($this->getLocalityData() as [ $slug, $name ]) { |
|
| 16 | 16 | $locality = new Locality(); |
| 17 | 17 | $locality->setName($name); |
| 18 | 18 | $locality->setSlug($slug); |
@@ -26,9 +26,9 @@ discard block |
||
| 26 | 26 | { |
| 27 | 27 | return [ |
| 28 | 28 | // $localityData = [$slug, $name]; |
| 29 | - ['miami', 'Miami'], |
|
| 30 | - ['palm-beach', 'Palm Beach'], |
|
| 31 | - ['tampa', 'Tampa'], |
|
| 29 | + [ 'miami', 'Miami' ], |
|
| 30 | + [ 'palm-beach', 'Palm Beach' ], |
|
| 31 | + [ 'tampa', 'Tampa' ], |
|
| 32 | 32 | ]; |
| 33 | 33 | } |
| 34 | 34 | } |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | )); |
| 34 | 34 | $user->setPhone('0(0)99766899'); |
| 35 | 35 | $user->setEmail('admin@admin'); |
| 36 | - $user->setRoles(['ROLE_ADMIN']); |
|
| 36 | + $user->setRoles([ 'ROLE_ADMIN' ]); |
|
| 37 | 37 | $manager->persist($user); |
| 38 | 38 | $manager->flush(); |
| 39 | 39 | $this->addReference(self::ADMIN_USER_REFERENCE, $user); |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | { |
| 13 | 13 | public function load(ObjectManager $manager): void |
| 14 | 14 | { |
| 15 | - foreach ($this->getOperationData() as [$slug, $name]) { |
|
| 15 | + foreach ($this->getOperationData() as [ $slug, $name ]) { |
|
| 16 | 16 | $operation = new Operation(); |
| 17 | 17 | $operation->setName($name); |
| 18 | 18 | $operation->setSlug($slug); |
@@ -26,8 +26,8 @@ discard block |
||
| 26 | 26 | { |
| 27 | 27 | return [ |
| 28 | 28 | // $operationData = [$slug, $name]; |
| 29 | - ['rent', 'Rent'], |
|
| 30 | - ['sale', 'Sale'], |
|
| 29 | + [ 'rent', 'Rent' ], |
|
| 30 | + [ 'sale', 'Sale' ], |
|
| 31 | 31 | ]; |
| 32 | 32 | } |
| 33 | 33 | } |