Passed
Push — master ( c58a40...6d37ad )
by Mathias
10:02 queued 04:27
created
module/Core/src/Form/EmptySummaryAwareTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      */
51 51
     public function getEmptySummaryNotice()
52 52
     {
53
-        if (! isset($this->emptySummaryNotice) && property_exists($this, 'defaultEmptySummaryNotice')) {
53
+        if (!isset($this->emptySummaryNotice) && property_exists($this, 'defaultEmptySummaryNotice')) {
54 54
             $this->emptySummaryNotice = $this->defaultEmptySummaryNotice;
55 55
         }
56 56
         
Please login to merge, or discard this patch.
module/Core/src/Form/Tree/AddItemFieldset.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,13 +79,13 @@
 block discarded – undo
79 79
             'name' => [
80 80
                 'required' => true,
81 81
                 'filters' => [
82
-                    [ 'name' => 'StringTrim' ],
82
+                    ['name' => 'StringTrim'],
83 83
                 ],
84 84
             ],
85 85
             'value' => [
86 86
                 'required' => false,
87 87
                 'filters' => [
88
-                    [ 'name' => 'StringTrim' ],
88
+                    ['name' => 'StringTrim'],
89 89
                 ],
90 90
             ],
91 91
         ];
Please login to merge, or discard this patch.
module/Core/src/Form/Tree/ManagementForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      *
36 36
      * @var array
37 37
      */
38
-    protected $scripts = [ 'modules/Core/js/html.sortable.min.js', 'modules/Core/js/forms.tree-management.js' ];
38
+    protected $scripts = ['modules/Core/js/html.sortable.min.js', 'modules/Core/js/forms.tree-management.js'];
39 39
 
40 40
     /**
41 41
      * Attributes.
Please login to merge, or discard this patch.
module/Core/src/Form/Tree/ManagementFieldset.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 
51 51
     public function init()
52 52
     {
53
-    	$this->setName('items');
53
+        $this->setName('items');
54 54
         $this->add([
55 55
                 'type' => 'Collection',
56 56
                 'name' => 'items',
Please login to merge, or discard this patch.
module/Core/src/Form/Container.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
         $formAction = $formInstance->getAttribute('action');
325 325
 
326 326
         if (empty($formAction)) {
327
-            $formInstance->setAttribute('action', '?form=' . $formName);
327
+            $formInstance->setAttribute('action', '?form='.$formName);
328 328
         }
329 329
 
330 330
         // @TODO: [ZF3] which one is correct? $form[options][label] or $form[options]
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
                 $spec->setParent($this);
397 397
             }
398 398
 
399
-            $spec = [ '__instance__' => $spec, 'name' => $key, 'entity' => '*' ];
399
+            $spec = ['__instance__' => $spec, 'name' => $key, 'entity' => '*'];
400 400
         }
401 401
 
402 402
         if (!is_array($spec)) {
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
         }
516 516
         $this->activeForms = array_filter(
517 517
             $this->activeForms,
518
-            function ($item) use ($key) {
518
+            function($item) use ($key) {
519 519
                 return !in_array($item, $key);
520 520
             }
521 521
         );
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
      * @throws \InvalidArgumentException
530 530
      * @return Container
531 531
      */
532
-    public function setEntity($entity, $key='*')
532
+    public function setEntity($entity, $key = '*')
533 533
     {
534 534
         if (!$entity instanceof EntityInterface) {
535 535
             throw new \InvalidArgumentException(sprintf('$entity must be instance of %s', EntityInterface::class));
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
      *
552 552
      * @return \Core\Entity\EntityInterface
553 553
      */
554
-    public function getEntity($key='*')
554
+    public function getEntity($key = '*')
555 555
     {
556 556
         return isset($this->entities[$key]) ? $this->entities[$key] : null;
557 557
     }
@@ -753,10 +753,10 @@  discard block
 block discarded – undo
753 753
         $actualKey = $this->getActiveFormActual();
754 754
         if (isset($actualKey)) {
755 755
             $forms = array_keys($this->forms);
756
-            $formsFlip =  array_flip($forms);
756
+            $formsFlip = array_flip($forms);
757 757
             $index = $formsFlip[$actualKey];
758 758
             if (0 < $index) {
759
-                $key = $forms[$index-1];
759
+                $key = $forms[$index - 1];
760 760
             }
761 761
         }
762 762
         return $key;
@@ -773,10 +773,10 @@  discard block
 block discarded – undo
773 773
         $actualKey = $this->getActiveFormActual();
774 774
         if (isset($actualKey)) {
775 775
             $forms = array_keys($this->forms);
776
-            $formsFlip =  array_flip($forms);
776
+            $formsFlip = array_flip($forms);
777 777
             $index = $formsFlip[$actualKey];
778 778
             if ($index < count($forms) - 1) {
779
-                $key = $forms[$index+1];
779
+                $key = $forms[$index + 1];
780 780
             }
781 781
         }
782 782
         return $key;
@@ -790,7 +790,7 @@  discard block
 block discarded – undo
790 790
      */
791 791
     public function formatAction($name)
792 792
     {
793
-        return sprintf('%s%s', $this->hasParent() ? $this->getName() . '.' : '', $name);
793
+        return sprintf('%s%s', $this->hasParent() ? $this->getName().'.' : '', $name);
794 794
     }
795 795
 
796 796
     /**
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
     public function getActionFor($key)
801 801
     {
802 802
         if (isset($this->forms[$key])) {
803
-            return '?form=' . $this->formatAction($this->forms[$key]['name']);
803
+            return '?form='.$this->formatAction($this->forms[$key]['name']);
804 804
         }
805 805
     }
806 806
 }
Please login to merge, or discard this patch.
module/Core/src/Form/View/Helper/FormEditor.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -134,8 +134,8 @@
 block discarded – undo
134 134
             $elementOptions = $element->getOptions();
135 135
             if (array_key_exists('placeholder', $elementOptions) && !empty($elementOptions['placeholder'])) {
136 136
                 $placeHolder = '<div id="placeholder-' . $name . '" style="border: 0 none; position: relative; top: 0ex; left: 10px; color: #aaa; height: 0px; overflow: visible;' .
137
-                               (empty($content)?'':'display:none;') .
138
-                               '">' . $this->translator->translate($elementOptions['placeholder']) . '</div>';
137
+                                (empty($content)?'':'display:none;') .
138
+                                '">' . $this->translator->translate($elementOptions['placeholder']) . '</div>';
139 139
             }
140 140
             return
141 141
                 $placeHolder
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      *
47 47
      * @var string
48 48
      */
49
-    protected $language="de";
49
+    protected $language = "de";
50 50
 
51 51
     /**
52 52
      * @var
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public function render(ElementInterface $element)
62 62
     {
63
-        $name   = $element->getName();
63
+        $name = $element->getName();
64 64
         if (empty($name) && $name !== 0) {
65 65
             throw new \DomainException(
66 66
                 sprintf(
@@ -84,10 +84,10 @@  discard block
 block discarded – undo
84 84
         //$headscript->prependFile($basepath('/assets/jquery/jquery.min.js'));
85 85
 
86 86
         $headscript->offsetSetScript(
87
-            '1000_tinymce_' . $this->getTheme(),
87
+            '1000_tinymce_'.$this->getTheme(),
88 88
             '
89 89
             $(document).ready(function() {
90
-            tinyMCE.init({' . $this->additionalOptions() . ',
90
+            tinyMCE.init({' . $this->additionalOptions().',
91 91
                  skin_url: "'.$this->skinUrl.'",
92 92
                  setup:  function(editor) {
93 93
                  
@@ -135,15 +135,15 @@  discard block
 block discarded – undo
135 135
             $content = '';
136 136
         }
137 137
         if (is_string($content)) {
138
-            $class = array_key_exists('class', $attributes)?$attributes['class']:'';
139
-            $class .= (empty($class)?:' ') . ' tinymce_' . $this->getTheme();
138
+            $class = array_key_exists('class', $attributes) ? $attributes['class'] : '';
139
+            $class .= (empty($class) ?: ' ').' tinymce_'.$this->getTheme();
140 140
             $attributes['class'] = $class;
141 141
             $placeHolder = '';
142 142
             $elementOptions = $element->getOptions();
143 143
             if (array_key_exists('placeholder', $elementOptions) && !empty($elementOptions['placeholder'])) {
144
-                $placeHolder = '<div id="placeholder-' . $name . '" style="border: 0 none; position: relative; top: 0ex; left: 10px; color: #aaa; height: 0px; overflow: visible;' .
145
-                               (empty($content)?'':'display:none;') .
146
-                               '">' . $this->translator->translate($elementOptions['placeholder']) . '</div>';
144
+                $placeHolder = '<div id="placeholder-'.$name.'" style="border: 0 none; position: relative; top: 0ex; left: 10px; color: #aaa; height: 0px; overflow: visible;'.
145
+                               (empty($content) ? '' : 'display:none;').
146
+                               '">'.$this->translator->translate($elementOptions['placeholder']).'</div>';
147 147
             }
148 148
             return
149 149
                 $placeHolder
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
      */
182 182
     public function setLanguage($language)
183 183
     {
184
-        $this->language=$language;
184
+        $this->language = $language;
185 185
     }
186 186
 
187 187
     /**
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      */
192 192
     public function setLanguagePath($languagePath)
193 193
     {
194
-        $this->languagePath=$languagePath;
194
+        $this->languagePath = $languagePath;
195 195
     }
196 196
 
197 197
     /**
Please login to merge, or discard this patch.
module/Core/src/Form/View/Helper/FormCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         if (!$elementId) {
70 70
             $elementId = preg_replace(
71 71
                 array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'),
72
-                array('-'              , '-'    , ''       ),
72
+                array('-', '-', ''),
73 73
                 $element->getName()
74 74
             );
75 75
         }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
                 if (!$elementOrFieldsetId) {
105 105
                     $elementOrFieldsetId = preg_replace(
106 106
                         array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'),
107
-                        array('-'              , '-'    , ''       ),
107
+                        array('-', '-', ''),
108 108
                         $elementOrFieldset->getName()
109 109
                     );
110 110
                 }
Please login to merge, or discard this patch.
module/Core/src/Form/View/Helper/FormInfoCheckbox.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,8 @@
 block discarded – undo
48 48
                 }
49 49
                 $linktext = $translator->translate($linktext);
50 50
                 $link = '<a data-toggle="modal" href="' . $href . '" '
51
-                      . 'data-target="#modal-' . $element->getAttribute('id') . '">'
52
-                      . $linktext . '</a>';
51
+                        . 'data-target="#modal-' . $element->getAttribute('id') . '">'
52
+                        . $linktext . '</a>';
53 53
                 
54 54
                 $label = sprintf($label, $link);
55 55
             }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -44,26 +44,26 @@  discard block
 block discarded – undo
44 44
                     $href = $this->getView()->url($route, $params, true);
45 45
                 } else {
46 46
                     /*@todo add more options like providing url... */
47
-                    $href="";
47
+                    $href = "";
48 48
                 }
49 49
                 $linktext = $translator->translate($linktext);
50
-                $link = '<a data-toggle="modal" href="' . $href . '" '
51
-                      . 'data-target="#modal-' . $element->getAttribute('id') . '">'
52
-                      . $linktext . '</a>';
50
+                $link = '<a data-toggle="modal" href="'.$href.'" '
51
+                      . 'data-target="#modal-'.$element->getAttribute('id').'">'
52
+                      . $linktext.'</a>';
53 53
                 
54 54
                 $label = sprintf($label, $link);
55 55
             }
56 56
         }
57 57
 
58 58
         if ($headline) {
59
-            $headline = '<h6>' . $translator->translate($headline, $textDomain) . '</h6>';
59
+            $headline = '<h6>'.$translator->translate($headline, $textDomain).'</h6>';
60 60
         }
61 61
         
62 62
         $markup = '
63 63
         <div class="checkbox">
64 64
             <label for="%s">%s %s</label>
65 65
         </div>
66
-        <div class="modal fade modal-scrollable" id="modal-' . $element->getAttribute('id') . '" tabindex="-1" role="dialog" aria-labelledby="label-search-user" aria-hidden="true">
66
+        <div class="modal fade modal-scrollable" id="modal-' . $element->getAttribute('id').'" tabindex="-1" role="dialog" aria-labelledby="label-search-user" aria-hidden="true">
67 67
             <div class="modal-dialog modal-lg">
68 68
                 <div class="modal-content">
69 69
                 </div>
@@ -77,6 +77,6 @@  discard block
 block discarded – undo
77 77
             $label
78 78
         );
79 79
         
80
-        return $headline . $markup;
80
+        return $headline.$markup;
81 81
     }
82 82
 }
Please login to merge, or discard this patch.
module/Core/src/Form/View/Helper/Element/SpinnerButton.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
             if (null === $buttonContent) {
28 28
                 throw new Exception\DomainException(
29 29
                     sprintf(
30
-                        '%s expects either button content as the second argument, ' .
30
+                        '%s expects either button content as the second argument, '.
31 31
                         'or that the element provided has a label value; neither found',
32 32
                         __METHOD__
33 33
                     )
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
 
46 46
         $escape = $this->getEscapeHtmlHelper();
47 47
         $translator = $this->getTranslator();
48
-        $buttonContent = '<div><div class="processing yk-hidden"><span class="fa-spin yk-icon-spinner yk-icon"></span> ' . $translator->translate('processing', $this->getTranslatorTextDomain()) . '</div><div class="default">' . $escape($buttonContent) . '</div></div>';
48
+        $buttonContent = '<div><div class="processing yk-hidden"><span class="fa-spin yk-icon-spinner yk-icon"></span> '.$translator->translate('processing', $this->getTranslatorTextDomain()).'</div><div class="default">'.$escape($buttonContent).'</div></div>';
49 49
 
50
-        return $openTag . $buttonContent . $this->closeTag();
50
+        return $openTag.$buttonContent.$this->closeTag();
51 51
     }
52 52
 }
Please login to merge, or discard this patch.