Completed
Push — master ( 2e195b...9e660e )
by
unknown
02:50
created
src/Admin/Traits/Mapper.php 2 patches
Doc Comments   +15 added lines patch added patch discarded remove patch
@@ -544,6 +544,9 @@  discard block
 block discarded – undo
544 544
         return $mapper;
545 545
     }
546 546
 
547
+    /**
548
+     * @param string $class
549
+     */
547 550
     protected function configureFields($function, BaseMapper $mapper, $class = null)
548 551
     {
549 552
         if (!$class) {
@@ -805,6 +808,9 @@  discard block
 block discarded – undo
805 808
         return $baseRoute;
806 809
     }
807 810
 
811
+    /**
812
+     * @param string $callbackType
813
+     */
808 814
     protected function manageCallback($mapper, &$options, $callbackType)
809 815
     {
810 816
         $option = $options[$callbackType];
@@ -833,12 +839,18 @@  discard block
 block discarded – undo
833 839
         return $callBackFunction;
834 840
     }
835 841
 
842
+    /**
843
+     * @param BaseMapper $mapper
844
+     */
836 845
     protected function manageQueryCallback($mapper, &$options)
837 846
     {
838 847
         $callback = $this->manageCallback($mapper, $options, 'query');
839 848
         $options['query'] = $callback;
840 849
     }
841 850
 
851
+    /**
852
+     * @param BaseMapper $mapper
853
+     */
842 854
     protected function manageChoicesCallback($mapper, &$options)
843 855
     {
844 856
         $callback = $this->manageCallback($mapper, $options, 'choicesCallback');
@@ -850,6 +862,9 @@  discard block
 block discarded – undo
850 862
         unset($options['choicesCallback']);
851 863
     }
852 864
 
865
+    /**
866
+     * @param BaseMapper $mapper
867
+     */
853 868
     public function manageServiceCallback($mapper, &$options)
854 869
     {
855 870
         $this->manageCallback($mapper, $options, 'serviceCallback');
Please login to merge, or discard this patch.
Spacing   +6 added lines, -10 removed lines patch added patch discarded remove patch
@@ -71,11 +71,9 @@  discard block
 block discarded – undo
71 71
 
72 72
         $fcts = [
73 73
             'tabs' => $mapper instanceof ShowMapper ?
74
-                ['getter' => 'getShowTabs', 'setter' => 'setShowTabs'] :
75
-                ['getter' => 'getFormTabs', 'setter' => 'setFormTabs'],
74
+                ['getter' => 'getShowTabs', 'setter' => 'setShowTabs'] : ['getter' => 'getFormTabs', 'setter' => 'setFormTabs'],
76 75
             'groups' => $mapper instanceof ShowMapper ?
77
-                ['getter' => 'getShowGroups', 'setter' => 'setShowGroups'] :
78
-                ['getter' => 'getFormGroups', 'setter' => 'setFormGroups'],
76
+                ['getter' => 'getShowGroups', 'setter' => 'setShowGroups'] : ['getter' => 'getFormGroups', 'setter' => 'setFormGroups'],
79 77
         ];
80 78
 
81 79
         // Figure out if we have to display tabs on the Show view
@@ -265,11 +263,9 @@  discard block
 block discarded – undo
265 263
 
266 264
         $fcts = [
267 265
             'tabs' => $mapper instanceof ShowMapper ?
268
-            ['getter' => 'getShowTabs', 'setter' => 'setShowTabs'] :
269
-            ['getter' => 'getFormTabs', 'setter' => 'setFormTabs'],
266
+            ['getter' => 'getShowTabs', 'setter' => 'setShowTabs'] : ['getter' => 'getFormTabs', 'setter' => 'setFormTabs'],
270 267
             'groups' => $mapper instanceof ShowMapper ?
271
-            ['getter' => 'getShowGroups', 'setter' => 'setShowGroups'] :
272
-            ['getter' => 'getFormGroups', 'setter' => 'setFormGroups'],
268
+            ['getter' => 'getShowGroups', 'setter' => 'setShowGroups'] : ['getter' => 'getFormGroups', 'setter' => 'setFormGroups'],
273 269
         ];
274 270
 
275 271
         // if a grouped organization can be shapped
@@ -667,7 +663,7 @@  discard block
 block discarded – undo
667 663
                     if (!is_array($fields) && isset($blast[$class][ListMapper::class]['add']['_export_format'][$fields])) {
668 664
                         $blast[$class][ListMapper::class]['add']['_export_format'][$format] = // the global fields array
669 665
                                 $fields = // the local  fields array
670
-                                $blast[$class][ListMapper::class]['add']['_export_format'][$fields];  // the source fields array
666
+                                $blast[$class][ListMapper::class]['add']['_export_format'][$fields]; // the source fields array
671 667
                     }
672 668
 
673 669
                     // removes a specific format
@@ -844,7 +840,7 @@  discard block
 block discarded – undo
844 840
         $callback = $this->manageCallback($mapper, $options, 'choicesCallback');
845 841
 
846 842
         $options['choices'] = $callback;
847
-        $options['choice_loader'] = new CallbackChoiceLoader(function () use ($options) {
843
+        $options['choice_loader'] = new CallbackChoiceLoader(function() use ($options) {
848 844
             return $options['choices'];
849 845
         });
850 846
         unset($options['choicesCallback']);
Please login to merge, or discard this patch.
src/Command/PatcherApplyCommand.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -102,6 +102,9 @@
 block discarded – undo
102 102
         }
103 103
     }
104 104
 
105
+    /**
106
+     * @param string $targetFile
107
+     */
105 108
     private function getCommand($targetFile, $patchFile)
106 109
     {
107 110
         return sprintf(
Please login to merge, or discard this patch.
src/Controller/CRUDController.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -291,6 +291,9 @@
 block discarded – undo
291 291
     {
292 292
     }
293 293
 
294
+    /**
295
+     * @param \Symfony\Component\Form\FormView $formView
296
+     */
294 297
     protected function defineFormTheme($formView, $formTheme)
295 298
     {
296 299
         $twig = $this->get('twig');
Please login to merge, or discard this patch.
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -296,8 +296,7 @@
 block discarded – undo
296 296
         $twig = $this->get('twig');
297 297
 
298 298
         $renderer = ($twig->hasExtension('Symfony\Bridge\Twig\Form\TwigRenderer')) ?
299
-                  $twig->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer') :
300
-                  $twig->getExtension('Symfony\Bridge\Twig\Extension\FormExtension')->renderer;
299
+                  $twig->getRuntime('Symfony\Bridge\Twig\Form\TwigRenderer') : $twig->getExtension('Symfony\Bridge\Twig\Extension\FormExtension')->renderer;
301 300
         $renderer->setTheme($formView, $formTheme);
302 301
     }
303 302
 }
Please login to merge, or discard this patch.
src/Controller/CoreController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
                 foreach ($pager->getResults() as $result) {
53 53
                     $results[] = array(
54 54
                         'label' => $admin->toString($result),
55
-                        'link'  => $admin->generateObjectUrl('show', $result),  // Sonata uses "edit", we prefer "show"
55
+                        'link'  => $admin->generateObjectUrl('show', $result), // Sonata uses "edit", we prefer "show"
56 56
                         'id'    => $admin->id($result),
57 57
                     );
58 58
                 }
Please login to merge, or discard this patch.
src/Admin/Traits/Base.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,10 +67,10 @@
 block discarded – undo
67 67
 
68 68
         if ($this->isGranted('DELETE')) {
69 69
             $actions['delete'] = array(
70
-               'label'              => 'action_delete',
71
-               'translation_domain' => 'SonataAdminBundle',
72
-               'ask_confirmation'   => true,
73
-           );
70
+                'label'              => 'action_delete',
71
+                'translation_domain' => 'SonataAdminBundle',
72
+                'ask_confirmation'   => true,
73
+            );
74 74
         }
75 75
 
76 76
         return $this->handleBatchActions($actions);
Please login to merge, or discard this patch.