Completed
Push — master ( 852698...9531ed )
by Valery
04:57
created
config/bootstrap.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 // Run "composer dump-env prod" to create it (requires symfony/flex >=1.2)
9 9
 if (is_array($env = @include dirname(__DIR__).'/.env.local.php')) {
10 10
     foreach ($env as $k => $v) {
11
-        $_ENV[$k] = $_ENV[$k] ?? (isset($_SERVER[$k]) && 0 !== strpos($k, 'HTTP_') ? $_SERVER[$k] : $v);
11
+        $_ENV[ $k ] = $_ENV[ $k ] ?? (isset($_SERVER[ $k ]) && 0 !== strpos($k, 'HTTP_') ? $_SERVER[ $k ] : $v);
12 12
     }
13 13
 } elseif (!class_exists(Dotenv::class)) {
14 14
     throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.');
@@ -18,6 +18,6 @@  discard block
 block discarded – undo
18 18
 }
19 19
 
20 20
 $_SERVER += $_ENV;
21
-$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev';
22
-$_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV'];
23
-$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0';
21
+$_SERVER[ 'APP_ENV' ] = $_ENV[ 'APP_ENV' ] = ($_SERVER[ 'APP_ENV' ] ?? $_ENV[ 'APP_ENV' ] ?? null) ?: 'dev';
22
+$_SERVER[ 'APP_DEBUG' ] = $_SERVER[ 'APP_DEBUG' ] ?? $_ENV[ 'APP_DEBUG' ] ?? 'prod' !== $_SERVER[ 'APP_ENV' ];
23
+$_SERVER[ 'APP_DEBUG' ] = $_ENV[ 'APP_DEBUG' ] = (int) $_SERVER[ 'APP_DEBUG' ] || filter_var($_SERVER[ 'APP_DEBUG' ], FILTER_VALIDATE_BOOLEAN) ? '1' : '0';
Please login to merge, or discard this patch.
src/Controller/BaseController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     public function settings()
18 18
     {
19 19
         return $this->getDoctrine()->getRepository(Setting::class)
20
-            ->findAll()[0];
20
+            ->findAll()[ 0 ];
21 21
     }
22 22
 
23 23
     public function menu(): array
Please login to merge, or discard this patch.
src/Controller/Admin/PageController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             $pageService->create($page);
44 44
             $this->addFlash('success', 'message.created');
45 45
 
46
-            return $this->redirectToRoute('page', ['slug' => $page->getSlug()]);
46
+            return $this->redirectToRoute('page', [ 'slug' => $page->getSlug() ]);
47 47
         }
48 48
 
49 49
         return $this->render('admin/page/new.html.twig', [
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             $this->getDoctrine()->getManager()->flush();
67 67
             $this->addFlash('success', 'message.updated');
68 68
 
69
-            return $this->redirectToRoute('page', ['slug' => $page->getSlug()]);
69
+            return $this->redirectToRoute('page', [ 'slug' => $page->getSlug() ]);
70 70
         }
71 71
 
72 72
         return $this->render('admin/page/edit.html.twig', [
Please login to merge, or discard this patch.
src/Controller/Admin/MenuController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,9 +91,9 @@
 block discarded – undo
91 91
         $items = $request->request->get('items');
92 92
         $repository = $this->getDoctrine()->getRepository(Menu::class);
93 93
         $repository->reorderItems($items);
94
-        $response = json_encode(['status' => 'ok']);
94
+        $response = json_encode([ 'status' => 'ok' ]);
95 95
 
96
-        return new JsonResponse($response, 200, [], true);
96
+        return new JsonResponse($response, 200, [ ], true);
97 97
     }
98 98
 
99 99
     /**
Please login to merge, or discard this patch.
src/Controller/Admin/SettingController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     {
23 23
         $repository = $this->getDoctrine()->getRepository(Setting::class);
24 24
 
25
-        $settings = $repository->findAll()[0];
25
+        $settings = $repository->findAll()[ 0 ];
26 26
 
27 27
         $form = $this->createForm(SettingType::class, $settings);
28 28
         $form->handleRequest($request);
Please login to merge, or discard this patch.
src/Controller/Admin/PropertyController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 
57 57
             $this->addFlash('success', 'message.created');
58 58
 
59
-            return $this->redirectToRoute('admin_photo_edit', ['id' => $property->getId()]);
59
+            return $this->redirectToRoute('admin_photo_edit', [ 'id' => $property->getId() ]);
60 60
         }
61 61
 
62 62
         return $this->render('admin/property/new.html.twig', [
Please login to merge, or discard this patch.
src/Controller/Admin/UserController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
             $user->setPassword($this->passwordEncoder->encodePassword($user, $password));
57 57
 
58 58
             // Set role
59
-            $user->setRoles(['ROLE_ADMIN']);
59
+            $user->setRoles([ 'ROLE_ADMIN' ]);
60 60
 
61 61
             $em = $this->getDoctrine()->getManager();
62 62
             $em->persist($user);
Please login to merge, or discard this patch.
src/Service/PageService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $cache = new FilesystemAdapter();
47 47
 
48
-        $count = $cache->get('pages_count', function () {
48
+        $count = $cache->get('pages_count', function() {
49 49
             return $this->em->getRepository(Page::class)->countAll();
50 50
         });
51 51
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $cache->delete('pages_count');
64 64
 
65 65
         // Delete a menu item
66
-        $menu = $this->em->getRepository(Menu::class)->findOneBy(['url' => '/info/'.$page->getSlug()]);
66
+        $menu = $this->em->getRepository(Menu::class)->findOneBy([ 'url' => '/info/'.$page->getSlug() ]);
67 67
         if ($menu) {
68 68
             $this->em->remove($menu);
69 69
             $this->em->flush();
Please login to merge, or discard this patch.
src/Utils/Slugger.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,14 +32,14 @@
 block discarded – undo
32 32
      */
33 33
     private static function transliteration($str)
34 34
     {
35
-        $a = ['зг', 'Зг', 'А', 'а', 'Б', 'б', 'В', 'в', 'Г', 'г', 'Ґ', 'ґ', 'Д', 'д', 'Е',
35
+        $a = [ 'зг', 'Зг', 'А', 'а', 'Б', 'б', 'В', 'в', 'Г', 'г', 'Ґ', 'ґ', 'Д', 'д', 'Е',
36 36
             'е', 'Ё', 'ё', 'Є', 'є', 'Ж', 'ж', 'З', 'з', 'И', 'и', 'І', 'і', 'Ї', 'ї', 'Й', 'й', 'К', 'к',
37 37
             'Л', 'л', 'М', 'м', 'Н', 'н', 'О', 'о', 'П', 'п', 'Р', 'р', 'С', 'с', 'Т', 'т', 'У', 'у', 'Ф',
38 38
             'ф', 'Х', 'х', 'Ц', 'ц', 'Ч', 'ч', 'Ш', 'ш', 'Щ', 'щ', 'Ы', 'ы', 'Э', 'э', 'Ю', 'ю', 'Я', 'я',
39 39
             'Ь', 'ь', 'Ъ', 'ъ',
40 40
         ];
41 41
 
42
-        $b = ['zgh', 'Zgh', 'A', 'a', 'B', 'b', 'V', 'v', 'G', 'g', 'G', 'g', 'D', 'd', 'E',
42
+        $b = [ 'zgh', 'Zgh', 'A', 'a', 'B', 'b', 'V', 'v', 'G', 'g', 'G', 'g', 'D', 'd', 'E',
43 43
             'e', 'E', 'e', 'Ye', 'ie', 'Zh', 'zh', 'Z', 'z', 'I', 'i', 'I', 'i', 'Yi', 'i', 'Y', 'y', 'K', 'k',
44 44
             'L', 'l', 'M', 'm', 'N', 'n', 'O', 'o', 'P', 'p', 'R', 'r', 'S', 's', 'T', 't', 'U', 'u', 'F', 'f', 'Kh', 'kh',
45 45
             'Ts', 'ts', 'Ch', 'ch', 'Sh', 'sh', 'Shch', 'shch', 'Y', 'y', 'E', 'e', 'Yu', 'iu', 'Ya', 'ya',
Please login to merge, or discard this patch.