Completed
Push — Recipes ( 630f49...c8afb0 )
by Laurent
12:15 queued 03:48
created
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/Entity/Orders/Orders.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      */
151 151
     public function setAmount($amount)
152 152
     {
153
-        $this->amount = (double)$amount;
153
+        $this->amount = (double) $amount;
154 154
 
155 155
         return $this;
156 156
     }
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
      */
174 174
     public function setTva($tva)
175 175
     {
176
-        $this->tva = (double)$tva;
176
+        $this->tva = (double) $tva;
177 177
 
178 178
         return $this;
179 179
     }
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.
src/Form/Type/Orders/OrdersEditType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
                 EntityType::class,
40 40
                 array(
41 41
                     'class' => 'App:Settings\Supplier',
42
-                    'query_builder' => function (EntityRepository $er) {
42
+                    'query_builder' => function(EntityRepository $er) {
43 43
                         return $er->createQueryBuilder('s')
44 44
                             ->where('s.active = 1');
45 45
                     },
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                     'label' => 'title',
51 51
                     'translation_domain' => 'gs_suppliers',
52 52
                     'empty_data' => null,
53
-                    'attr'  => ['class' => 'form-control', 'readonly' => true,],
53
+                    'attr'  => ['class' => 'form-control', 'readonly' => true, ],
54 54
                 )
55 55
             )
56 56
             ->add(
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
                     'format' => 'EEEE dd MMMM yyyy',
65 65
                     'html5' => false,
66 66
                     'input' => 'datetime',
67
-                    'attr'  => ['class' => 'form-control', 'readonly' => true,],
67
+                    'attr'  => ['class' => 'form-control', 'readonly' => true, ],
68 68
                 )
69 69
             )
70 70
             ->add(
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                     'format' => 'EEEE dd MMMM yyyy',
79 79
                     'html5' => false,
80 80
                     'input' => 'datetime',
81
-                    'attr'  => ['class' => 'form-control', 'readonly' => true,],
81
+                    'attr'  => ['class' => 'form-control', 'readonly' => true, ],
82 82
                 )
83 83
             )
84 84
             ->add(
Please login to merge, or discard this patch.
src/Form/Type/Orders/InvoicesEditType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 
38 38
     public function configureOptions(OptionsResolver $resolver)
39 39
     {
40
-        $resolver->setDefaults(['data_class' => 'App\Entity\Orders\Orders',]);
40
+        $resolver->setDefaults(['data_class' => 'App\Entity\Orders\Orders', ]);
41 41
     }
42 42
 
43 43
     public function getBlockPrefix()
Please login to merge, or discard this patch.
src/Form/Type/Orders/InvoicesArticlesType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         $builder
40 40
             ->add('quantity', NumberType::class, ['required' => false, 'scale' => 3, 'grouping' => true,
41 41
                 'empty_data' => '0,000', 'label' => 'settings.quantity', 'translation_domain' => 'gs_articles',
42
-                'attr'=> ['class' => 'form-control text-right', 'readonly' => true, ],])
42
+                'attr'=> ['class' => 'form-control text-right', 'readonly' => true, ], ])
43 43
             ->add('price', MoneyType::class, ['required' => true, 'scale' => 3, 'grouping' => true,
44 44
                 'currency' => 'EUR', 'label' => 'settings.price', 'translation_domain' => 'gs_articles',
45 45
                 'attr'=> ['class' => 'form-control text-right', ]])
Please login to merge, or discard this patch.
src/Form/Type/Orders/OrdersType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,16 +32,16 @@
 block discarded – undo
32 32
     {
33 33
         $builder
34 34
             ->add('supplier', EntityType::class, ['class' => 'App:Settings\Supplier',
35
-                'query_builder' => function (EntityRepository $er) {
35
+                'query_builder' => function(EntityRepository $er) {
36 36
                     return $er->createQueryBuilder('s')->where('s.active = 1');
37 37
                 }, 'required' => false, 'choice_label' => 'name', 'multiple' => false,
38 38
                 'placeholder' => 'form.choice_supplier', 'label' => 'title', 'translation_domain' => 'gs_suppliers',
39
-                'empty_data' => null, 'attr'  => ['class' => 'form-control',],]);
39
+                'empty_data' => null, 'attr'  => ['class' => 'form-control', ], ]);
40 40
     }
41 41
 
42 42
     public function configureOptions(OptionsResolver $resolver)
43 43
     {
44
-        $resolver->setDefaults(['data_class' => 'App\Entity\Orders\Orders',]);
44
+        $resolver->setDefaults(['data_class' => 'App\Entity\Orders\Orders', ]);
45 45
     }
46 46
 
47 47
     public function getBlockPrefix()
Please login to merge, or discard this patch.