Completed
Push — Recipes ( 630f49...c8afb0 )
by Laurent
12:15 queued 03:48
created
src/Controller/Settings/SupplierController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
 
67 67
         // Récupérer les articles du fournisseur.
68 68
         $articles = $etm->getRepository('App:Settings\Article')->getArticleFromSupplier($supplier);
69
-        return ['supplier' => $supplier, 'articles' => $articles, 'delete_form' => $deleteForm->createView(),];
69
+        return ['supplier' => $supplier, 'articles' => $articles, 'delete_form' => $deleteForm->createView(), ];
70 70
     }
71 71
 
72 72
     /**
Please login to merge, or discard this patch.
src/Controller/Staff/UserController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
     public function createAction(Request $request)
100 100
     {
101 101
         $user = new User();
102
-        $form = $this->createForm(UserType::class, $user, ['action' => $this->generateUrl('user_create'),]);
102
+        $form = $this->createForm(UserType::class, $user, ['action' => $this->generateUrl('user_create'), ]);
103 103
         $form->handleRequest($request);
104
-        $return = ['user' => $user, 'form'   => $form->createView(),];
104
+        $return = ['user' => $user, 'form'   => $form->createView(), ];
105 105
 
106 106
         if ($form->isValid()) {
107 107
             $return = $this->validUser($user, 'create');
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         $editForm->handleRequest($request);
162 162
         $return = ['user' => $user,
163 163
             'edit_form' => $editForm->createView(),
164
-            'delete_form' => $deleteForm->createView(),];
164
+            'delete_form' => $deleteForm->createView(), ];
165 165
 
166 166
         if ($editForm->isValid()) {
167 167
             $return = $this->validUser($user, 'edit');
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
         }
241 241
         $userManager = $this->get('fos_user.user_manager');
242 242
         $userManager->updateUser($user);
243
-        $this->addFlash('info', 'gestock.' . $action . '.ok');
243
+        $this->addFlash('info', 'gestock.'.$action.'.ok');
244 244
 
245 245
         if ($action === 'create') {
246 246
             $return = $this->redirectToRoute('user_show', ['id' => $user->getId()]);
Please login to merge, or discard this patch.
src/Controller/Staff/GroupController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
         $form = $this->createForm(GroupType::class, $group);
101 101
         AbstractController::addRolesAction($form, $group);
102 102
         $form->handleRequest($request);
103
-        $return = ['group' => $group, 'form' => $form->createView(),];
103
+        $return = ['group' => $group, 'form' => $form->createView(), ];
104 104
 
105 105
         if ($form->isValid()) {
106 106
             $etm = $this->getDoctrine()->getManager();
Please login to merge, or discard this patch.
src/Controller/DefaultController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
             ['6', 'App:Settings\Supplier'],
54 54
             ['7', 'App:Settings\Article'],
55 55
             ['8', 'App:Settings\Diverse\Material'],
56
-            ['9', 'App:Stocks\Inventory'], );
56
+            ['9', 'App:Stocks\Inventory'],);
57 57
     }
58 58
 
59 59
     /**
Please login to merge, or discard this patch.
src/Menu/RequestVoter.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
         if ($item->getUri() === $request->getRequestUri()) {
23 23
             // URL's completely match
24 24
             return true;
25
-        } elseif ($item->getUri() !== $request->getBaseUrl() . '/' &&
25
+        } elseif ($item->getUri() !== $request->getBaseUrl().'/' &&
26 26
             substr($request->getRequestUri(), 0, strlen($item->getUri()))
27 27
             === $item->getUri()) {
28 28
             // URL isn't just "/" and the first part of the URL match
Please login to merge, or discard this patch.
src/Helper/ControllerHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,6 +114,6 @@
 block discarded – undo
114 114
     {
115 115
         $session = new Session();
116 116
 
117
-        return $session->has('sort.' . $name) ? $session->get('sort.' . $name) : null;
117
+        return $session->has('sort.'.$name) ? $session->get('sort.'.$name) : null;
118 118
     }
119 119
 }
Please login to merge, or discard this patch.
src/Helper/TimeHelper.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -30,19 +30,19 @@  discard block
 block discarded – undo
30 30
     private function getEaster($pYear = null)
31 31
     {
32 32
         if (is_null($pYear)) {
33
-            $pYear = (int)date('Y');
33
+            $pYear = (int) date('Y');
34 34
         }
35 35
         $nDate = $pYear - 1900;
36
-        $pAa = $nDate%19;
37
-        $pBb = floor(((7*$pAa)+1)/19);
38
-        $pCc = ((11*$pAa)-$pBb+4)%29;
39
-        $pDd = floor($nDate/4);
40
-        $pEe = ($nDate-$pCc+$pDd+31)%7;
41
-        $pResult = 25-$pCc-$pEe;
36
+        $pAa = $nDate % 19;
37
+        $pBb = floor(((7 * $pAa) + 1) / 19);
38
+        $pCc = ((11 * $pAa) - $pBb + 4) % 29;
39
+        $pDd = floor($nDate / 4);
40
+        $pEe = ($nDate - $pCc + $pDd + 31) % 7;
41
+        $pResult = 25 - $pCc - $pEe;
42 42
         if ($pResult > 0) {
43 43
             $pEaster = strtotime($pYear.'/04/'.$pResult);
44 44
         } else {
45
-            $pEaster = strtotime($pYear.'/03/'.(31+$pResult));
45
+            $pEaster = strtotime($pYear.'/03/'.(31 + $pResult));
46 46
         }
47 47
         return $pEaster;
48 48
     }
@@ -61,20 +61,20 @@  discard block
 block discarded – undo
61 61
     {
62 62
         $aBankHolidays = ['1_1', '1_5', '8_5', '14_7', '15_8', '1_11', '11_11', '25_12', ];
63 63
         if (function_exists('easter_date')) {
64
-            $pEaster = easter_date((int)date('Y', $pDate));
64
+            $pEaster = easter_date((int) date('Y', $pDate));
65 65
         } else {
66
-            $pEaster = $this->getEaster((int)date('Y', $pDate));
66
+            $pEaster = $this->getEaster((int) date('Y', $pDate));
67 67
         }
68 68
         $aBankHolidays[] = date('j_n', $pEaster);
69
-        $aBankHolidays[] = date('j_n', $pEaster + (86400*39));
70
-        $aBankHolidays[] = date('j_n', $pEaster + (86400*49));
69
+        $aBankHolidays[] = date('j_n', $pEaster + (86400 * 39));
70
+        $aBankHolidays[] = date('j_n', $pEaster + (86400 * 49));
71 71
 
72
-        $pEnd = strtotime('+' . $pDays . ' day', $pDate);
72
+        $pEnd = strtotime('+'.$pDays.' day', $pDate);
73 73
         $idn = 0;
74 74
         while ($idn < $pEnd) {
75 75
             if (in_array(date('w', $pEnd), array(0, 6)) || in_array(date('j_n', $pEnd), $aBankHolidays)) {
76 76
                 $pEnd = strtotime('+1 day', $pEnd);
77
-                $pDays ++;
77
+                $pDays++;
78 78
             }
79 79
             $idn = strtotime('+1 day', $idn);
80 80
         }
Please login to merge, or discard this patch.
src/Form/EventListener/AddSaveEditFieldSubscriber.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
             $form->add(
44 44
                 'save',
45 45
                 SubmitType::class,
46
-                ['attr' => ['class' => 'btn btn-default btn-primary btn-create',], 'label' => 'Create',
47
-                    'translation_domain' => 'admin',]
46
+                ['attr' => ['class' => 'btn btn-default btn-primary btn-create', ], 'label' => 'Create',
47
+                    'translation_domain' => 'admin', ]
48 48
             )
49 49
             ->add(
50 50
                 'addmore',
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
             $form->add(
57 57
                 'save',
58 58
                 SubmitType::class,
59
-                ['attr' => ['class' => 'btn btn-default btn-primary btn-edit',], 'label' => 'Edit',
60
-                    'translation_domain' => 'admin',]
59
+                ['attr' => ['class' => 'btn btn-default btn-primary btn-edit', ], 'label' => 'Edit',
60
+                    'translation_domain' => 'admin', ]
61 61
             );
62 62
         }
63 63
     }
Please login to merge, or discard this patch.
src/Form/Type/Orders/OrdersArticlesType.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,24 +34,24 @@
 block discarded – undo
34 34
         $builder
35 35
             ->add('orders', EntityType::class, ['required' => false, 'class' => 'App:Orders\Orders',
36 36
                 'choice_label' => 'id', 'label' => 'gestock.id', 'translation_domain' => 'messages',
37
-                'empty_data' => null,])
37
+                'empty_data' => null, ])
38 38
             ->add('article', EntityType::class, ['required' => false, 'class' => 'App:Settings\Article',
39 39
                 'choice_label' => 'name', 'label' => 'title', 'translation_domain' => 'gs_articles',
40
-                'empty_data' => null,])
40
+                'empty_data' => null, ])
41 41
             ->add('quantity', NumberType::class, ['scale' => 3, 'grouping' => true, 'empty_data' => '0,000',
42 42
                 'label' => 'settings.quantity', 'translation_domain' => 'gs_articles',
43
-                'attr'=> ['class' => 'form-control text-right',],])
43
+                'attr'=> ['class' => 'form-control text-right', ], ])
44 44
             ->add('unitStorage', EntityType::class, ['required' => false, 'class' => 'App:Settings\Diverse\Unit',
45
-                'choice_label' => 'abbr', 'label' => 'gestock.settings.diverse.unitstorage', 'empty_data' => null,])
45
+                'choice_label' => 'abbr', 'label' => 'gestock.settings.diverse.unitstorage', 'empty_data' => null, ])
46 46
             ->add('price', MoneyType::class, ['required' => false, 'scale' => 3, 'grouping' => true,
47 47
                 'currency' => 'EUR', 'label' => 'settings.price', 'translation_domain' => 'gs_articles',
48
-                'attr'=> ['class' => 'form-control text-right', 'readonly' => true,],])
48
+                'attr'=> ['class' => 'form-control text-right', 'readonly' => true, ], ])
49 49
             ->add('tva', EntityType::class, ['required' => false, 'class' => 'App:Settings\Diverse\Tva',
50 50
                 'choice_label' => 'name', 'choice_value' => 'rate', 'label' => 'gestock.settings.diverse.vat',
51
-                'empty_data' => null,])
51
+                'empty_data' => null, ])
52 52
             ->add('total', MoneyType::class, ['required' => false, 'scale' => 3, 'grouping' => true,
53 53
                 'currency' => 'EUR', 'label' => 'seizure.total', 'translation_domain' => 'gs_orders',
54
-                'mapped' => false, 'attr'=> ['class' => 'form-control text-right', 'readonly' => true,],])
54
+                'mapped' => false, 'attr'=> ['class' => 'form-control text-right', 'readonly' => true, ], ])
55 55
         ;
56 56
     }
57 57
 
Please login to merge, or discard this patch.