Completed
Pull Request — master (#47)
by Pavel
17:19
created
src/AppBundle/Controller/Admin/CategoryController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
             return $this->redirectToRoute('show_category');
38 38
         }
39 39
 
40
-        return ['form' => $form->createView()];
40
+        return [ 'form' => $form->createView() ];
41 41
     }
42 42
 
43 43
     /**
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             return $this->redirectToRoute('show_category');
61 61
         }
62 62
 
63
-        return ['form' => $form->createView()];
63
+        return [ 'form' => $form->createView() ];
64 64
     }
65 65
 
66 66
     /**
@@ -90,12 +90,12 @@  discard block
 block discarded – undo
90 90
         $em = $this->getDoctrine()->getManager();
91 91
 
92 92
         $category = $em->getRepository('AppBundle:Category')
93
-            ->findBy([], ['title' => 'ASC']);
93
+            ->findBy([ ], [ 'title' => 'ASC' ]);
94 94
 
95
-        $form_delete = [];
95
+        $form_delete = [ ];
96 96
 
97 97
         foreach ($category as $item) {
98
-            $form_delete[$item->getId()] = $this->createFormDelete($item->getId())->createView();
98
+            $form_delete[ $item->getId() ] = $this->createFormDelete($item->getId())->createView();
99 99
         }
100 100
 
101 101
         return [
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     private function createFormDelete($id)
112 112
     {
113 113
         return $this->createFormBuilder()
114
-            ->setAction($this->generateUrl('remove_category', ['id' => $id]))
114
+            ->setAction($this->generateUrl('remove_category', [ 'id' => $id ]))
115 115
             ->setMethod('DELETE')
116 116
             ->add('submit', SubmitType::class, [
117 117
                 'label' => ' ',
Please login to merge, or discard this patch.
src/AppBundle/Controller/Admin/AdminInfoUsersController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
             $moduleAjax = $em->getRepository('AppBundle:PassModule')
27 27
                 ->findAjax($module);
28 28
 
29
-            return new Response(json_encode(['moduleAjax' => $moduleAjax]));
29
+            return new Response(json_encode([ 'moduleAjax' => $moduleAjax ]));
30 30
         }
31 31
 
32 32
         $modules = $em->getRepository('AppBundle:ModuleUser')
Please login to merge, or discard this patch.
src/AppBundle/Controller/DefaultController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public function indexAction()
22 22
     {
23
-        return [];
23
+        return [ ];
24 24
     }
25 25
 
26 26
     /**
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             $moduleAjax = $em->getRepository('AppBundle:PassModule')
36 36
                 ->findAjax($module);
37 37
 
38
-            return new Response(json_encode(['moduleAjax' => $moduleAjax]));
38
+            return new Response(json_encode([ 'moduleAjax' => $moduleAjax ]));
39 39
         }
40 40
     }
41 41
 }
Please login to merge, or discard this patch.
src/AppBundle/Form/UserType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@
 block discarded – undo
38 38
                             'class' => 'form-control',
39 39
                         ]
40 40
                     ],
41
-                    'first_options'  => ['label' => 'Password'],
42
-                    'second_options' => ['label' => 'Repeat Password'],
41
+                    'first_options'  => [ 'label' => 'Password' ],
42
+                    'second_options' => [ 'label' => 'Repeat Password' ],
43 43
                 ]
44 44
             );
45 45
     }
Please login to merge, or discard this patch.
src/AppBundle/Controller/Admin/MassActionController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
             $users = $em->getRepository('AppBundle:User')
27 27
                 ->findChoiceModules($module);
28 28
 
29
-            return new Response(json_encode(['users' => $users]));
29
+            return new Response(json_encode([ 'users' => $users ]));
30 30
         }
31 31
 
32 32
         if ($choice = $request->get('users_choice')) {
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
                 $moduleUser = new ModuleUser();
39 39
                 $moduleUser->setModule($moduleHidden);
40 40
                 $user = $em->getRepository('AppBundle:User')
41
-                    ->find($choice[$i]);
41
+                    ->find($choice[ $i ]);
42 42
                 $moduleUser->setUser($user);
43 43
                 $user->removeChosenModule($hiddenModule);
44 44
                 $em->persist($moduleUser);
Please login to merge, or discard this patch.
src/AppBundle/Repository/UserRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     {
25 25
         return $this->createQueryBuilder('u')
26 26
             ->where('u.chosenModule LIKE :module')
27
-            ->setParameter('module', '%"'.$module.'"%')
27
+            ->setParameter('module', '%"' . $module . '"%')
28 28
             ->getQuery()
29 29
             ->getResult();
30 30
     }
Please login to merge, or discard this patch.
src/AppBundle/Entity/User.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         $this->isLocked = false;
128 128
         $this->modulesUser = new ArrayCollection();
129 129
         $this->role = self::ROLE_USER;
130
-        $this->chosenModule = [];
130
+        $this->chosenModule = [ ];
131 131
     }
132 132
 
133 133
     /**
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
      */
268 268
     public function getRoles()
269 269
     {
270
-        return [$this->role];
270
+        return [ $this->role ];
271 271
 
272 272
     }
273 273
 
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
      */
322 322
     public function isAccountNonLocked()
323 323
     {
324
-        return $this->isLocked ? false : true ;
324
+        return $this->isLocked ? false : true;
325 325
     }
326 326
 
327 327
     /**
@@ -491,8 +491,8 @@  discard block
 block discarded – undo
491 491
 
492 492
     public function removeChosenModule($chosenModule)
493 493
     {
494
-        if(($key = array_search($chosenModule, $this->chosenModule)) !== false) {
495
-            unset($this->chosenModule[$key]);
494
+        if (($key = array_search($chosenModule, $this->chosenModule)) !== false) {
495
+            unset($this->chosenModule[ $key ]);
496 496
         }
497 497
 
498 498
         return $this;
Please login to merge, or discard this patch.
src/AppBundle/Form/UpdateUserSocialNetType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@
 block discarded – undo
38 38
                             'class' => 'form-control',
39 39
                         ]
40 40
                     ],
41
-                    'first_options'  => ['label' => 'Password'],
42
-                    'second_options' => ['label' => 'Repeat Password'],
41
+                    'first_options'  => [ 'label' => 'Password' ],
42
+                    'second_options' => [ 'label' => 'Repeat Password' ],
43 43
                 ]
44 44
             );
45 45
     }
Please login to merge, or discard this patch.
src/AppBundle/Form/QuestionType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,16 +17,16 @@  discard block
 block discarded – undo
17 17
 {
18 18
     public function buildForm(FormBuilderInterface $builder, array $options)
19 19
     {
20
-        $newSort = $options['new_sort'];
20
+        $newSort = $options[ 'new_sort' ];
21 21
         $sortAttrs = [
22 22
             'attr' => [
23 23
                 'class' => 'form-control',
24 24
             ],
25
-            'choices' => [1=>1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],
25
+            'choices' => [ 1=>1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ],
26 26
             'choices_as_values' => true,
27 27
         ];
28 28
 
29
-        if($newSort)$sortAttrs['data'] = $newSort;
29
+        if ($newSort)$sortAttrs[ 'data' ] = $newSort;
30 30
 
31 31
         $builder
32 32
             ->add('textQuestion', TextType::class, [
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                 ],
51 51
 
52 52
             ])
53
-            ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event)  {
53
+            ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) {
54 54
                 $data = $event->getData();
55 55
 
56 56
                 foreach ($data->getAnswers() as $item) {
Please login to merge, or discard this patch.