Passed
Push — master ( c58a40...6d37ad )
by Mathias
10:02 queued 04:27
created
module/Core/src/Form/View/Helper/SearchForm.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
         $content = $this->renderElements($form, $colMap, $buttonsSpan);
68 68
 
69 69
         return $this->openTag($form)
70
-             . '<div class="row" style="padding: 0 15px;">'
71
-             . $content . '</div>' . $this->closeTag();
70
+                . '<div class="row" style="padding: 0 15px;">'
71
+                . $content . '</div>' . $this->closeTag();
72 72
     }
73 73
 
74 74
     public function renderButtons($buttons)
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
             $attrs = $helper->createAttributesString($button->getAttributes());
82 82
 
83 83
             $content.= '<button ' . $attrs . '>'
84
-                       . $this->getTranslator()->translate($button->getLabel(), $this->getTranslatorTextDomain())
85
-                       . '</button>';
84
+                        . $this->getTranslator()->translate($button->getLabel(), $this->getTranslatorTextDomain())
85
+                        . '</button>';
86 86
         }
87 87
 
88 88
         return $content;
@@ -118,15 +118,15 @@  discard block
 block discarded – undo
118 118
 
119 119
             if ($element->getName() == $form->getButtonElement()) {
120 120
                 $content.='<div class="input-group col-md-' . $cols . '">'
121
-                              . $formElement($element)
122
-                              . '<div class="input-group-btn search-form-buttons" style="width: 1px;">'
123
-                              . $this->renderButtons($form->getButtons()) . '</div>'
124
-                              . '</div>';
121
+                                . $formElement($element)
122
+                                . '<div class="input-group-btn search-form-buttons" style="width: 1px;">'
123
+                                . $this->renderButtons($form->getButtons()) . '</div>'
124
+                                . '</div>';
125 125
                 $buttonsRendered = true;
126 126
             } else {
127 127
                 $content .= '<div class="input-group col-md-' . $cols . '">'
128
-                          . $formElement($element)
129
-                          . '</div>';
128
+                            . $formElement($element)
129
+                            . '</div>';
130 130
             }
131 131
 
132 132
             $i += 1;
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
                 $buttonsSpan = $form->getOption('buttons_span') ?: 12;
138 138
             }
139 139
             $content .= '<div class="input-group search-form-buttons col-md-' . $buttonsSpan . ' text-right">'
140
-                      . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>';
140
+                        . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>';
141 141
         }
142 142
 
143 143
         return $content;
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      * @param array $colMap
36 36
      * @return Form|string
37 37
      */
38
-    public function __invoke(FormInterface $form = null, $colMap=null)
38
+    public function __invoke(FormInterface $form = null, $colMap = null)
39 39
     {
40 40
         if (!$form) {
41 41
             return $this;
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         return $this->render($form, $colMap);
45 45
     }
46 46
 
47
-    public function render(FormInterface $form, $colMap=null, $buttonsSpan = null)
47
+    public function render(FormInterface $form, $colMap = null, $buttonsSpan = null)
48 48
     {
49 49
         $headscript = $this->getView()->plugin('headscript');
50 50
         $basepath   = $this->getView()->plugin('basepath');
@@ -61,14 +61,14 @@  discard block
 block discarded – undo
61 61
         $form->prepare();
62 62
 
63 63
         if ($form instanceof ViewPartialProviderInterface) {
64
-            return $this->getView()->partial($form->getViewPartial(), [ 'element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan ]);
64
+            return $this->getView()->partial($form->getViewPartial(), ['element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan]);
65 65
         }
66 66
 
67 67
         $content = $this->renderElements($form, $colMap, $buttonsSpan);
68 68
 
69 69
         return $this->openTag($form)
70 70
              . '<div class="row" style="padding: 0 15px;">'
71
-             . $content . '</div>' . $this->closeTag();
71
+             . $content.'</div>'.$this->closeTag();
72 72
     }
73 73
 
74 74
     public function renderButtons($buttons)
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             $button->removeAttribute('name');
81 81
             $attrs = $helper->createAttributesString($button->getAttributes());
82 82
 
83
-            $content.= '<button ' . $attrs . '>'
83
+            $content .= '<button '.$attrs.'>'
84 84
                        . $this->getTranslator()->translate($button->getLabel(), $this->getTranslatorTextDomain())
85 85
                        . '</button>';
86 86
         }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     public function renderElements($form, $colMap = null, $buttonsSpan = null)
92 92
     {
93 93
         if ($form instanceof ViewPartialProviderInterface) {
94
-            return $this->getView()->partial($form->getViewPartial(), [ 'element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan ]);
94
+            return $this->getView()->partial($form->getViewPartial(), ['element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan]);
95 95
         }
96 96
 
97 97
         if (null === $colMap) {
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         $formElement = $this->getView()->plugin('formElement');
102 102
         $content = '';
103 103
         $buttonsRendered = false;
104
-        $i=0;
104
+        $i = 0;
105 105
         foreach ($form as $element) {
106 106
             if ($element instanceof Hidden) {
107 107
                 $content .= $formElement($element);
@@ -117,14 +117,14 @@  discard block
 block discarded – undo
117 117
             }
118 118
 
119 119
             if ($element->getName() == $form->getButtonElement()) {
120
-                $content.='<div class="input-group col-md-' . $cols . '">'
120
+                $content .= '<div class="input-group col-md-'.$cols.'">'
121 121
                               . $formElement($element)
122 122
                               . '<div class="input-group-btn search-form-buttons" style="width: 1px;">'
123
-                              . $this->renderButtons($form->getButtons()) . '</div>'
123
+                              . $this->renderButtons($form->getButtons()).'</div>'
124 124
                               . '</div>';
125 125
                 $buttonsRendered = true;
126 126
             } else {
127
-                $content .= '<div class="input-group col-md-' . $cols . '">'
127
+                $content .= '<div class="input-group col-md-'.$cols.'">'
128 128
                           . $formElement($element)
129 129
                           . '</div>';
130 130
             }
@@ -136,8 +136,8 @@  discard block
 block discarded – undo
136 136
             if (null === $buttonsSpan) {
137 137
                 $buttonsSpan = $form->getOption('buttons_span') ?: 12;
138 138
             }
139
-            $content .= '<div class="input-group search-form-buttons col-md-' . $buttonsSpan . ' text-right">'
140
-                      . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>';
139
+            $content .= '<div class="input-group search-form-buttons col-md-'.$buttonsSpan.' text-right">'
140
+                      . '<div class="btn-group">'.$this->renderButtons($form->getButtons()).'</div></div>';
141 141
         }
142 142
 
143 143
         return $content;
Please login to merge, or discard this patch.
module/Core/src/Form/View/Helper/FormEditorLight.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,5 +19,5 @@
 block discarded – undo
19 19
 {
20 20
     protected $theme = 'light';
21 21
 
22
-    protected $languagePath="modules/Core/js/tinymce-lang/";
22
+    protected $languagePath = "modules/Core/js/tinymce-lang/";
23 23
 }
Please login to merge, or discard this patch.
module/Core/src/Form/View/Helper/RequiredMarkInFormLabel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,6 +28,6 @@
 block discarded – undo
28 28
             );
29 29
         }
30 30
 
31
-        return $this->openTag($element) . $labelContent . $this->closeTag();
31
+        return $this->openTag($element).$labelContent.$this->closeTag();
32 32
     }
33 33
 }
Please login to merge, or discard this patch.
module/Core/src/Form/View/Helper/FormFileUpload.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -113,11 +113,11 @@  discard block
 block discarded – undo
113 113
 
114 114
             return str_replace(
115 115
                 array('#abort',
116
-                      '__file-uri__',
117
-                      '__file-name__',
118
-                      '__file-size__',
119
-                      'fu-working',
120
-                      'fa-file-o'
116
+                        '__file-uri__',
117
+                        '__file-name__',
118
+                        '__file-size__',
119
+                        'fu-working',
120
+                        'fa-file-o'
121 121
                 ),
122 122
                 array("$uri?do=delete", $uri, $name, $size, '', $icon),
123 123
                 $template
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
             '<div class="fu-nonempty-notice"' . ('' == trim($preview) ? ' style="display:none;"' : '') . '>'
141 141
             . $this->getNonEmptyNotice() . '</div>';
142 142
         $emptynotice    = '<div class="fu-empty-notice"'
143
-                          . ('' == trim($preview) ? '' : ' style="display: none;"') . '>
143
+                            . ('' == trim($preview) ? '' : ' style="display: none;"') . '>
144 144
                        ' . $this->getEmptyNotice() . '
145 145
                   </div>';
146 146
 
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -90,12 +90,12 @@  discard block
 block discarded – undo
90 90
     </a>
91 91
     <div class="fu-errors input-error">
92 92
         <ul class="errors">
93
-            <li class="fu-error-size">' . $translator->translate('The file is too big', $textDomain) . '</li>
94
-            <li class="fu-error-type">' . $translator->translate('The file type is not supported', $textDomain) . '</li>
93
+            <li class="fu-error-size">' . $translator->translate('The file is too big', $textDomain).'</li>
94
+            <li class="fu-error-type">' . $translator->translate('The file type is not supported', $textDomain).'</li>
95 95
             <li class="fu-error-count">' . sprintf(
96 96
     $translator->translate('You may only upload %d files', $textDomain),
97 97
     $element->getAttribute('data-maxfilecount')
98
-) . '</li><li class="fu-error-general">' . $translator->translate('An unknown error occured.') . '</li>
98
+).'</li><li class="fu-error-general">'.$translator->translate('An unknown error occured.').'</li>
99 99
         </ul>
100 100
    </div>
101 101
 </li>';
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         /* @var $basepath \Laminas\View\Helper\BasePath */
104 104
         $renderer          = $this->getView();
105 105
         $basepath          = $renderer->plugin('basepath');
106
-        $createFileDisplay = function ($file) use ($template, $basepath) {
106
+        $createFileDisplay = function($file) use ($template, $basepath) {
107 107
             /* @var $file \Core\Entity\FileInterface */
108 108
             $uri  = $basepath($file->getUri());
109 109
             $name = $file->getMetadata()->getName();
@@ -137,11 +137,11 @@  discard block
 block discarded – undo
137 137
         }
138 138
 
139 139
         $nonemptynotice =
140
-            '<div class="fu-nonempty-notice"' . ('' == trim($preview) ? ' style="display:none;"' : '') . '>'
141
-            . $this->getNonEmptyNotice() . '</div>';
140
+            '<div class="fu-nonempty-notice"'.('' == trim($preview) ? ' style="display:none;"' : '').'>'
141
+            . $this->getNonEmptyNotice().'</div>';
142 142
         $emptynotice    = '<div class="fu-empty-notice"'
143
-                          . ('' == trim($preview) ? '' : ' style="display: none;"') . '>
144
-                       ' . $this->getEmptyNotice() . '
143
+                          . ('' == trim($preview) ? '' : ' style="display: none;"').'>
144
+                       ' . $this->getEmptyNotice().'
145 145
                   </div>';
146 146
 
147 147
         $markup = '
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
      */
289 289
     protected function getDefaultNotice()
290 290
     {
291
-        return '<small>' . $this->getTranslator()->translate('Click here to add files or use drag and drop.') . '</small>';
291
+        return '<small>'.$this->getTranslator()->translate('Click here to add files or use drag and drop.').'</small>';
292 292
     }
293 293
     
294 294
     /**
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
      */
299 299
     public function setAllowRemove($allowRemove)
300 300
     {
301
-        $this->allowRemove = (bool)$allowRemove;
301
+        $this->allowRemove = (bool) $allowRemove;
302 302
         
303 303
         return $this;
304 304
     }
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
      */
311 311
     public function setAllowClickableDropZone($allowClickableDropZone)
312 312
     {
313
-        $this->allowClickableDropZone = (bool)$allowClickableDropZone;
313
+        $this->allowClickableDropZone = (bool) $allowClickableDropZone;
314 314
         
315 315
         return $this;
316 316
     }
Please login to merge, or discard this patch.
module/Core/src/Form/View/Helper/FormRow.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
         if ($element instanceof ViewPartialProviderInterface && !$ignoreViewPartial) {
51 51
             return $this->getView()->partial(
52 52
                 $element->getViewPartial(),
53
-                                             array(
54
-                                                 'element' => $element,
55
-                                                 'labelWitdh' => $labelWidth,
56
-                                                 'label_attributes' => $labelAttributes
53
+                                                array(
54
+                                                    'element' => $element,
55
+                                                    'labelWitdh' => $labelWidth,
56
+                                                    'label_attributes' => $labelAttributes
57 57
                                                             )
58 58
             );
59 59
         }
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
         if ($desc && $this->layout != Form::LAYOUT_BARE) {
111 111
             if (null !== ($translator = $this->getTranslator())) {
112 112
                 $desc = $translator->translate(
113
-                                 $desc,
114
-                                 $this->getTranslatorTextDomain()
115
-                             );
113
+                                    $desc,
114
+                                    $this->getTranslatorTextDomain()
115
+                                );
116 116
             }
117 117
             $elementString .= sprintf(
118 118
                 '<div id="%s-desc" class="cam-description alert alert-info">%s</div>',
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -78,8 +78,8 @@  discard block
 block discarded – undo
78 78
         
79 79
         // Does this element have errors ?
80 80
         if (!empty($elementErrors) && !empty($inputErrorClass) && $this->layout != Form::LAYOUT_BARE) {
81
-            $classAttributes = ($element->hasAttribute('class') ? $element->getAttribute('class') . ' ' : '');
82
-            $classAttributes = $classAttributes . $inputErrorClass;
81
+            $classAttributes = ($element->hasAttribute('class') ? $element->getAttribute('class').' ' : '');
82
+            $classAttributes = $classAttributes.$inputErrorClass;
83 83
     
84 84
             $element->setAttribute('class', $classAttributes);
85 85
         }
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         if (!$element->hasAttribute('id')) {
88 88
             $elementId = preg_replace(
89 89
                 array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'),
90
-                array('-'             , '-',     ''),
90
+                array('-', '-', ''),
91 91
                 $element->getName()
92 92
             );
93 93
             $element->setAttribute('id', $elementId);
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         }
134 134
         
135 135
         // moved label here so we can change it in the ElementViewHelper
136
-        $label           = $element->getLabel();
136
+        $label = $element->getLabel();
137 137
         if (isset($label) && '' !== $label && !$element instanceof \Laminas\Form\Element\Button) {
138 138
             // Translate the label
139 139
             if (null !== ($translator = $this->getTranslator())) {
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
                     if ($this->shouldWrap) {
179 179
                         $spanWidth = 12 - $labelWidth;
180 180
                         $elementString = sprintf(
181
-                            '<div class="col-md-%d%s" id="' . $elementId . '-span">%s</div>',
181
+                            '<div class="col-md-%d%s" id="'.$elementId.'-span">%s</div>',
182 182
                             $spanWidth,
183 183
                             $elementErrors ? " $inputErrorClass" : '',
184 184
                             $elementString
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                             $label
190 190
                         );
191 191
                     }
192
-                    $markup = $label . $elementString;
192
+                    $markup = $label.$elementString;
193 193
                 }
194 194
             }
195 195
         } else {
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
             && !$element instanceof \Laminas\Form\Element\Button
211 211
             && $this->layout != Form::LAYOUT_BARE
212 212
             ) {
213
-            $markup = sprintf('<div class="controls controls-row ' . $form_row_class . '">%s</div>', $markup);
213
+            $markup = sprintf('<div class="controls controls-row '.$form_row_class.'">%s</div>', $markup);
214 214
         }
215 215
     
216 216
         return $markup;
Please login to merge, or discard this patch.
module/Core/src/Form/View/Helper/Form.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,8 +71,8 @@
 block discarded – undo
71 71
         $basepath   = $renderer->plugin('basepath');
72 72
         
73 73
         $headscript->appendFile($basepath('modules/Core/js/core.spinnerbutton.js'))
74
-                   //->appendFile($basepath('/assets/select2/js/select2.min.js'))
75
-                   ->appendFile($basepath('modules/Core/js/core.forms.js'));
74
+                    //->appendFile($basepath('/assets/select2/js/select2.min.js'))
75
+                    ->appendFile($basepath('modules/Core/js/core.forms.js'));
76 76
 
77 77
         /* @noinspection PhpParamsInspection */
78 78
         //$renderer->headLink()->appendStylesheet($basepath('/assets/select2/css/select2.css'));
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -88,14 +88,14 @@  discard block
 block discarded – undo
88 88
         
89 89
         $class = $form->getAttribute('class');
90 90
         $class = preg_replace('~\bform-[^ ]+\b~', '', $class);
91
-        $class .= ' ' . $layout;
91
+        $class .= ' '.$layout;
92 92
         
93 93
         $form->setAttribute('class', $class);
94 94
 
95 95
         $formId = $form->getAttribute('id') ?: $form->getName();
96 96
         $formId = preg_replace(
97 97
             array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'),
98
-            array('-'              , '-'    , ''       ),
98
+            array('-', '-', ''),
99 99
             $formId
100 100
         );
101 101
         $form->setAttribute(
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             if (!$elementId) {
122 122
                 $elementId = preg_replace(
123 123
                     array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'),
124
-                    array('-'             , '-',     ''),
124
+                    array('-', '-', ''),
125 125
                     $element->getName()
126 126
                 );
127 127
             }
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
             }
160 160
         }
161 161
         
162
-        return $this->openTag($form) . $formContent . $this->closeTag();
162
+        return $this->openTag($form).$formContent.$this->closeTag();
163 163
     }
164 164
     
165 165
     /**
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
                 );
188 188
                 
189 189
             if ($desc = $form->getOption('description', '')) {
190
-                $descriptionParams=$form->getOption('description_params');
190
+                $descriptionParams = $form->getOption('description_params');
191 191
                 $translator = $this->getTranslator();
192 192
                 $textDomain = $this->getTranslatorTextDomain();
193 193
                 $desc = $translator->translate($desc, $textDomain);
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
                     $desc
209 209
                 );
210 210
         } else {
211
-            $formContent = '<div class="form-content">' . $formContent . '</div>';
211
+            $formContent = '<div class="form-content">'.$formContent.'</div>';
212 212
         }
213 213
         
214 214
         $markup = '<div id="form-%s" class="form-container">'
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
                 . '</div>';
218 218
         
219 219
         if ($label = $form->getLabel()) {
220
-            $label = '<div class="form-headline"><h3>' . $renderer->translate($label) . '</h3></div>';
220
+            $label = '<div class="form-headline"><h3>'.$renderer->translate($label).'</h3></div>';
221 221
         }
222 222
         
223 223
         return sprintf(
Please login to merge, or discard this patch.
module/Core/src/Form/View/Helper/FormEditorColor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      */
20 20
     protected function additionalOptions()
21 21
     {
22
-        return 'toolbar: "undo redo | styleselect forecolor | bold italic | alignleft aligncenter alignright alignjustify | ' .
22
+        return 'toolbar: "undo redo | styleselect forecolor | bold italic | alignleft aligncenter alignright alignjustify | '.
23 23
         'bullist numlist outdent indent ", ';
24 24
     }
25 25
 }
Please login to merge, or discard this patch.
module/Core/src/Form/View/Helper/FilterForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,11 +39,11 @@
 block discarded – undo
39 39
                     $element->setLabel('');
40 40
                     $element->setAttribute('placeholder', $label);
41 41
                 }
42
-                $formContent .= $this->getView()->formRow($element, null, null, Form::LAYOUT_BARE) . ' ';
42
+                $formContent .= $this->getView()->formRow($element, null, null, Form::LAYOUT_BARE).' ';
43 43
             }
44 44
         }
45 45
         
46 46
         
47
-        return $this->openTag($form) . $formContent . $this->closeTag();
47
+        return $this->openTag($form).$formContent.$this->closeTag();
48 48
     }
49 49
 }
Please login to merge, or discard this patch.
module/Core/src/Form/View/Helper/FormSimple.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,12 +36,12 @@
 block discarded – undo
36 36
         $formContent = '';
37 37
         foreach ($form as $element) {
38 38
             if ($element instanceof FieldsetInterface) {
39
-                $formContent.= $this->getView()->formCollection($element);
39
+                $formContent .= $this->getView()->formCollection($element);
40 40
             } else {
41
-                $formContent.= $this->getView()->formRowSimple($element);
41
+                $formContent .= $this->getView()->formRowSimple($element);
42 42
             }
43 43
         }
44 44
 
45
-        return $this->openTag($form) . $formContent . $this->closeTag();
45
+        return $this->openTag($form).$formContent.$this->closeTag();
46 46
     }
47 47
 }
Please login to merge, or discard this patch.