Completed
Branch Recipes (cae097)
by Laurent
14:13 queued 11:11
created
src/AppBundle/Controller/Install/AbstractInstallController.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      * @param \Symfony\Component\Form\Form               $form      Form of Entity
71 71
      * @param \Doctrine\Common\Persistence\ObjectManager $etm       Entity Manager
72 72
      * @param integer                                    $number    Number of step install
73
-     * @return array Route after valid or not
73
+     * @return \Symfony\Component\HttpFoundation\RedirectResponse Route after valid or not
74 74
      */
75 75
     private function validInstall($entityNew, $form, ObjectManager $etm, $number)
76 76
     {
@@ -90,6 +90,9 @@  discard block
 block discarded – undo
90 90
         return $return;
91 91
     }
92 92
 
93
+    /**
94
+     * @param string $name
95
+     */
93 96
     private function nameToVariable($name)
94 97
     {
95 98
         
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,11 +47,11 @@
 block discarded – undo
47 47
         if ($ctEntity > 0 && $request->getMethod() == 'GET' && is_int($number)) {
48 48
             $message = 'gestock.install.st'.$number.'.yet_exist';
49 49
         }
50
-        $form = $this->createForm($typePath, $entityNew, ['action' => $this->generateUrl('gs_install_st'.$number),]);
50
+        $form = $this->createForm($typePath, $entityNew, ['action' => $this->generateUrl('gs_install_st'.$number), ]);
51 51
         if (is_int($number)) {
52
-            $return = ['message' => $message, 'form' => $form->createView(),];
52
+            $return = ['message' => $message, 'form' => $form->createView(), ];
53 53
         } else {
54
-            $return = [$this->nameToVariable($entity) => $entityNew, 'form' => $form->createView(),];
54
+            $return = [$this->nameToVariable($entity) => $entityNew, 'form' => $form->createView(), ];
55 55
         }
56 56
 
57 57
         if ($form->handleRequest($request)->isValid()) {
Please login to merge, or discard this patch.
src/AppBundle/Form/Type/Settings/SupplierType.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -40,49 +40,49 @@  discard block
 block discarded – undo
40 40
     public function buildForm(FormBuilderInterface $builder, array $options)
41 41
     {
42 42
         $builder
43
-            ->add('name', TextType::class, ['label' => 'gestock.name', 'attr'  => ['class' => 'form-control',],])
43
+            ->add('name', TextType::class, ['label' => 'gestock.name', 'attr'  => ['class' => 'form-control', ], ])
44 44
             ->add('address', TextType::class, ['label' => 'gestock.address',
45
-                'attr'  => ['placeholder' => 'gestock.address', 'class' => 'form-control',],])
45
+                'attr'  => ['placeholder' => 'gestock.address', 'class' => 'form-control', ], ])
46 46
             ->add('zipcode', TextType::class, ['attr' => ['placeholder' => 'gestock.zipcode',
47
-                'class' => 'form-control half',],])
47
+                'class' => 'form-control half', ], ])
48 48
             ->add('town', TextType::class, ['attr'  => ['placeholder' => 'gestock.town',
49
-                'class' => 'form-control half',],])
49
+                'class' => 'form-control half', ], ])
50 50
             ->add('phone', PhoneNumberType::class, ['default_region' => 'FR', 'format' => PhoneNumberFormat::NATIONAL,
51
-                    'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'country_choices' => ['FR', 'GB', 'DE', 'IT',],
52
-                    'preferred_country_choices' => ['FR',], 'label' => 'gestock.phone',])
51
+                    'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'country_choices' => ['FR', 'GB', 'DE', 'IT', ],
52
+                    'preferred_country_choices' => ['FR', ], 'label' => 'gestock.phone', ])
53 53
             ->add('fax', PhoneNumberType::class, ['default_region' => 'FR', 'format' => PhoneNumberFormat::NATIONAL,
54
-                    'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'country_choices' => ['FR', 'GB', 'DE', 'IT',],
55
-                    'preferred_country_choices' => ['FR',], 'label' => 'gestock.fax',
56
-                    'attr'  => ['class' => 'form-control',]])
57
-            ->add('mail', EmailType::class, ['label' => 'gestock.mail', 'attr'  => ['class' => 'form-control',]])
58
-            ->add('contact', TextType::class, ['label' => 'gestock.contact', 'attr'  => ['class' => 'form-control',],])
54
+                    'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'country_choices' => ['FR', 'GB', 'DE', 'IT', ],
55
+                    'preferred_country_choices' => ['FR', ], 'label' => 'gestock.fax',
56
+                    'attr'  => ['class' => 'form-control', ]])
57
+            ->add('mail', EmailType::class, ['label' => 'gestock.mail', 'attr'  => ['class' => 'form-control', ]])
58
+            ->add('contact', TextType::class, ['label' => 'gestock.contact', 'attr'  => ['class' => 'form-control', ], ])
59 59
             ->add('gsm', PhoneNumberType::class, ['default_region' => 'FR', 'format' => PhoneNumberFormat::NATIONAL,
60
-                    'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'country_choices' => ['FR', 'GB', 'DE', 'IT',],
61
-                    'preferred_country_choices' => ['FR',], 'label' => 'gestock.gsm',
62
-                'attr'  => ['class' => 'form-control',]])
60
+                    'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'country_choices' => ['FR', 'GB', 'DE', 'IT', ],
61
+                    'preferred_country_choices' => ['FR', ], 'label' => 'gestock.gsm',
62
+                'attr'  => ['class' => 'form-control', ]])
63 63
             /**
64 64
              * Délai de livraison A = jour de Cmde,
65 65
              * (B, C, D, E) = jour de livraison
66 66
              */
67 67
             ->add('delaydeliv', ChoiceType::class, ['choices' => ['form.atob' => 1, 'form.atoc' => 2,
68
-                'form.atod' => 3, 'form.atoe' => 4,], 'choices_as_values' => true, 'label' => 'settings.delay',
69
-                    'translation_domain' => 'gs_suppliers', 'attr'  => ['class' => 'form-control half',]])
68
+                'form.atod' => 3, 'form.atoe' => 4, ], 'choices_as_values' => true, 'label' => 'settings.delay',
69
+                    'translation_domain' => 'gs_suppliers', 'attr'  => ['class' => 'form-control half', ]])
70 70
             /**
71 71
              * Choix du jour de la semaine pour les Cmdes
72 72
              * Numérotation voir http://php.net/manual/fr/function.date.php format 'N'
73 73
              */
74 74
             ->add('orderdate', ChoiceType::class, ['choices' => ['Monday' => 1, 'Tuesday' => 2, 'Wednesday' => 3,
75
-                'Thursday' => 4, 'Friday' => 5, 'Saturday' => 6, 'Sunday' => 7,], 'choices_as_values' => true,
75
+                'Thursday' => 4, 'Friday' => 5, 'Saturday' => 6, 'Sunday' => 7, ], 'choices_as_values' => true,
76 76
                 'choice_translation_domain' => true, 'translation_domain' => 'messages', 'label' => 'day_order',
77
-                'attr'  => ['class' => 'form-control',], 'expanded' => true, 'multiple' => true,])
77
+                'attr'  => ['class' => 'form-control', ], 'expanded' => true, 'multiple' => true, ])
78 78
             ->add('familyLog', EntityType::class, ['class' => 'AppBundle:Settings\Diverse\FamilyLog',
79
-                    'query_builder' => function (EntityRepository $er) {
79
+                    'query_builder' => function(EntityRepository $er) {
80 80
                         return $er->createQueryBuilder('f')
81 81
                             ->orderBy('f.path', 'ASC');
82 82
                     }, 'choice_label' => 'indentedName', 'multiple' => false,
83 83
                     'placeholder' => 'gestock.settings.diverse.choice_family', 'empty_data' => null,
84
-                    'label' => 'gestock.settings.diverse.familylog', 'attr'  => ['class' => 'form-control half',]])
85
-            ->add('active', HiddenType::class, ['data' => true,]);
84
+                    'label' => 'gestock.settings.diverse.familylog', 'attr'  => ['class' => 'form-control half', ]])
85
+            ->add('active', HiddenType::class, ['data' => true, ]);
86 86
     }
87 87
 
88 88
     /**
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      */
91 91
     public function configureOptions(OptionsResolver $resolver)
92 92
     {
93
-        $resolver->setDefaults(['data_class' => 'AppBundle\Entity\Settings\Supplier',]);
93
+        $resolver->setDefaults(['data_class' => 'AppBundle\Entity\Settings\Supplier', ]);
94 94
     }
95 95
 
96 96
     /**
Please login to merge, or discard this patch.
src/AppBundle/Form/Type/Settings/SettingsType.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,13 +36,13 @@
 block discarded – undo
36 36
     {
37 37
         $builder
38 38
             ->add('inventory_style', ChoiceType::class, ['choices' => ['gestock.settings.settings.global' => 'global',
39
-                'gestock.settings.settings.zone_storage' => 'zonestorage',], 'choices_as_values' => true, 'expanded' => true, 'multiple' => false,
40
-                'label' => 'gestock.settings.settings.style_inventory',])
39
+                'gestock.settings.settings.zone_storage' => 'zonestorage', ], 'choices_as_values' => true, 'expanded' => true, 'multiple' => false,
40
+                'label' => 'gestock.settings.settings.style_inventory', ])
41 41
             ->add('calculation', ChoiceType::class, ['choices' => ['gestock.settings.settings.fifo' => 'fifo',
42
-                'gestock.settings.settings.weighted' => 'weighted',], 'choices_as_values' => true, 'expanded' => true, 'multiple' => false,
43
-                'label' => 'gestock.settings.settings.calculation',])
42
+                'gestock.settings.settings.weighted' => 'weighted', ], 'choices_as_values' => true, 'expanded' => true, 'multiple' => false,
43
+                'label' => 'gestock.settings.settings.calculation', ])
44 44
             ->add('currency', CurrencyType::class, ['multiple' => false, 'expanded' => false,
45
-                'preferred_choices' => ['EUR'], 'label' => 'gestock.settings.settings.currency',])
45
+                'preferred_choices' => ['EUR'], 'label' => 'gestock.settings.settings.currency', ])
46 46
             ->addEventSubscriber(new AddSaveEditFieldSubscriber())
47 47
         ;
48 48
     }
Please login to merge, or discard this patch.