Completed
Push — develop ( cc6530...59407f )
by Mathias
08:03
created
module/Core/src/Core/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/Core/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 = [ '/js/html.sortable.min.js', 'Core/js/forms.tree-management.js' ];
38
+    protected $scripts = ['/js/html.sortable.min.js', 'Core/js/forms.tree-management.js'];
39 39
 
40 40
     /**
41 41
      * Attributes.
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Factory/Repository/DefaultCategoriesBuilderFactory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@
 block discarded – undo
38 38
 
39 39
         $globalConfigPaths = [];
40 40
         foreach ($config['config_glob_paths'] as $path) {
41
-            $globalConfigPaths[] = substr($path, 0, strrpos($path, DIRECTORY_SEPARATOR)) . DIRECTORY_SEPARATOR;
41
+            $globalConfigPaths[] = substr($path, 0, strrpos($path, DIRECTORY_SEPARATOR)).DIRECTORY_SEPARATOR;
42 42
         }
43 43
 
44 44
         $moduleConfigPath = '.';
45 45
         foreach ($config['module_paths'] as $path) {
46
-            $path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
47
-            if (file_exists($path . 'Jobs')) {
48
-                $moduleConfigPath = $path . 'Jobs' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR;
46
+            $path = rtrim($path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
47
+            if (file_exists($path.'Jobs')) {
48
+                $moduleConfigPath = $path.'Jobs'.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR;
49 49
                 break;
50 50
             }
51 51
         }
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Repository/DefaultCategoriesBuilder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,13 +67,13 @@
 block discarded – undo
67 67
         $file = "jobs.categories.$type.php";
68 68
 
69 69
         foreach ($this->globalConfigPaths as $path) {
70
-            if (file_exists($path . $file)) {
71
-                return include $path . $file;
70
+            if (file_exists($path.$file)) {
71
+                return include $path.$file;
72 72
             }
73 73
         }
74 74
 
75
-        if (file_exists($this->moduleConfigPath . $file)) {
76
-            return include $this->moduleConfigPath . $file;
75
+        if (file_exists($this->moduleConfigPath.$file)) {
76
+            return include $this->moduleConfigPath.$file;
77 77
         }
78 78
 
79 79
         return false;
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/PaginationBuilder.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,6 @@
 block discarded – undo
110 110
      * @see \Core\Controller\Plugin\SearchForm::get()
111 111
      *
112 112
      * @param        $elementsFieldset
113
-     * @param null   $buttonsFieldset
114 113
      * @param string $as The name of the key in the result array.
115 114
      *
116 115
      * @return self
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         }
79 79
 
80 80
         if (!is_array($stack)) {
81
-            throw new \InvalidArgumentException('Expected argument to be of type array, but received ' . gettype($stack));
81
+            throw new \InvalidArgumentException('Expected argument to be of type array, but received '.gettype($stack));
82 82
         }
83 83
 
84 84
         $stack = array_intersect_key($stack, ['params' => true, 'form' => true, 'paginator' => true]);
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      *
148 148
      * @return self
149 149
      */
150
-    public function params($namespace, $defaults = [ 'page' => 1 ])
150
+    public function params($namespace, $defaults = ['page' => 1])
151 151
     {
152 152
         $this->stack['params'] = [$namespace, $defaults];
153 153
         return $this;
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
                         $queryArray[$match['name']][$v] = 1;
243 243
                     }
244 244
                 } else {
245
-                    $queryArray[ $match[ 'name' ] ] = $value;
245
+                    $queryArray[$match['name']] = $value;
246 246
                 }
247 247
                 unset($queryArray[$key]);
248 248
             }
Please login to merge, or discard this patch.
module/Core/src/Core/Form/View/Helper/SearchForm.php 3 patches
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -83,6 +83,11 @@
 block discarded – undo
83 83
         return $content;
84 84
     }
85 85
 
86
+    /**
87
+     * @param FormInterface $form
88
+     *
89
+     * @return null|FormInterface
90
+     */
86 91
     public function renderElements($form, $colMap = null, $buttonsSpan = null)
87 92
     {
88 93
         if ($form instanceOf ViewPartialProviderInterface) {
Please login to merge, or discard this patch.
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
 
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
             $attrs = $helper->createAttributesString($button->getAttributes());
83 83
 
84 84
             $content.= '<button ' . $attrs . '>'
85
-                       . $this->getTranslator()->translate($button->getLabel(), $this->getTranslatorTextDomain())
86
-                       . '</button>';
85
+                        . $this->getTranslator()->translate($button->getLabel(), $this->getTranslatorTextDomain())
86
+                        . '</button>';
87 87
         }
88 88
 
89 89
         return $content;
@@ -120,15 +120,15 @@  discard block
 block discarded – undo
120 120
 
121 121
             if ($element->getName() == $form->getButtonElement()) {
122 122
                 $content.='<div class="input-group col-md-' . $cols . '">'
123
-                              . $formElement($element)
124
-                              . '<div class="input-group-btn search-form-buttons" style="width: 1px;">'
125
-                              . $this->renderButtons($form->getButtons()) . '</div>'
126
-                              . '</div>';
123
+                                . $formElement($element)
124
+                                . '<div class="input-group-btn search-form-buttons" style="width: 1px;">'
125
+                                . $this->renderButtons($form->getButtons()) . '</div>'
126
+                                . '</div>';
127 127
                 $buttonsRendered = true;
128 128
             } else {
129 129
                 $content .= '<div class="input-group col-md-' . $cols . '">'
130
-                          . $formElement($element)
131
-                          . '</div>';
130
+                            . $formElement($element)
131
+                            . '</div>';
132 132
             }
133 133
 
134 134
             $i += 1;
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                 $buttonsSpan = $form->getOption('buttons_span') ?: 12;
140 140
             }
141 141
             $content .= '<div class="input-group search-form-buttons col-md-' . $buttonsSpan . ' text-right">'
142
-                      . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>';
142
+                        . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>';
143 143
         }
144 144
 
145 145
         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
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             $button->removeAttribute('name');
82 82
             $attrs = $helper->createAttributesString($button->getAttributes());
83 83
 
84
-            $content.= '<button ' . $attrs . '>'
84
+            $content .= '<button '.$attrs.'>'
85 85
                        . $this->getTranslator()->translate($button->getLabel(), $this->getTranslatorTextDomain())
86 86
                        . '</button>';
87 87
         }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     public function renderElements($form, $colMap = null, $buttonsSpan = null)
93 93
     {
94 94
         if ($form instanceOf ViewPartialProviderInterface) {
95
-            return $this->getView()->partial($form->getViewPartial(), [ 'element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan ]);
95
+            return $this->getView()->partial($form->getViewPartial(), ['element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan]);
96 96
         }
97 97
 
98 98
         if (null === $colMap) {
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         }
101 101
 
102 102
         $formElement = $this->getView()->plugin('formElement');
103
-        $content = ''; $buttonsRendered = false; $i=0;
103
+        $content = ''; $buttonsRendered = false; $i = 0;
104 104
         foreach ($form as $element) {
105 105
 
106 106
             if ($element instanceOf Hidden) {
@@ -119,14 +119,14 @@  discard block
 block discarded – undo
119 119
             }
120 120
 
121 121
             if ($element->getName() == $form->getButtonElement()) {
122
-                $content.='<div class="input-group col-md-' . $cols . '">'
122
+                $content .= '<div class="input-group col-md-'.$cols.'">'
123 123
                               . $formElement($element)
124 124
                               . '<div class="input-group-btn search-form-buttons" style="width: 1px;">'
125
-                              . $this->renderButtons($form->getButtons()) . '</div>'
125
+                              . $this->renderButtons($form->getButtons()).'</div>'
126 126
                               . '</div>';
127 127
                 $buttonsRendered = true;
128 128
             } else {
129
-                $content .= '<div class="input-group col-md-' . $cols . '">'
129
+                $content .= '<div class="input-group col-md-'.$cols.'">'
130 130
                           . $formElement($element)
131 131
                           . '</div>';
132 132
             }
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
             if (null === $buttonsSpan) {
139 139
                 $buttonsSpan = $form->getOption('buttons_span') ?: 12;
140 140
             }
141
-            $content .= '<div class="input-group search-form-buttons col-md-' . $buttonsSpan . ' text-right">'
142
-                      . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>';
141
+            $content .= '<div class="input-group search-form-buttons col-md-'.$buttonsSpan.' text-right">'
142
+                      . '<div class="btn-group">'.$this->renderButtons($form->getButtons()).'</div></div>';
143 143
         }
144 144
 
145 145
         return $content;
Please login to merge, or discard this patch.
module/Core/src/Core/Form/SearchForm.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
                     'label' => $label,
168 168
                 ],
169 169
                 'attributes' => [
170
-                    'class' => 'btn btn-' . ('submit' == $type ? 'primary' : 'default'),
170
+                    'class' => 'btn btn-'.('submit' == $type ? 'primary' : 'default'),
171 171
                     'type'  => $type,
172 172
                 ],
173 173
             ]
Please login to merge, or discard this patch.
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -47,6 +47,9 @@  discard block
 block discarded – undo
47 47
         $this->buttonsIterator->isLIFO(false);
48 48
     }
49 49
 
50
+    /**
51
+     * @param string $name
52
+     */
50 53
     public function setButtonElement($name)
51 54
     {
52 55
         return $this->setOption('button_element', $name);
@@ -182,6 +185,9 @@  discard block
 block discarded – undo
182 185
         return $this->buttonsIterator;
183 186
     }
184 187
 
188
+    /**
189
+     * @param string $name
190
+     */
185 191
     public function addButton($name, $priority = 0, $type = 'button')
186 192
     {
187 193
         if (is_array($name)) {
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/Snapshot.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 {
24 24
     /**
25 25
      * @param $data
26
-     * @return mixed
26
+     * @return Snapshot
27 27
      * @ODM\PreUpdate
28 28
      */
29 29
     public function __invoke($data)
Please login to merge, or discard this patch.
module/Core/src/Core/Mail/HTMLTemplateMessage.php 4 patches
Doc Comments   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      *
125 125
      * @param  string $name
126 126
      * @param  mixed $value
127
-     * @return ViewModel
127
+     * @return HTMLTemplateMessage
128 128
      */
129 129
     public function setVariable($name, $value)
130 130
     {
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
      *
186 186
      * Resets the internal variable container to an empty container.
187 187
      *
188
-     * @return ViewModel
188
+     * @return HTMLTemplateMessage
189 189
      */
190 190
     public function clearVariables()
191 191
     {
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 
196 196
     /**
197 197
      *
198
-     * @param $template
198
+     * @param string $template
199 199
      *
200 200
      * @return self
201 201
      */
@@ -205,6 +205,9 @@  discard block
 block discarded – undo
205 205
         return $this;
206 206
     }
207 207
 
208
+    /**
209
+     * @return string
210
+     */
208 211
     public function getTemplate()
209 212
     {
210 213
         return $this->template;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@
 block discarded – undo
239 239
 
240 240
             if ($resolver->resolve($this->getTemplate() . '.' . $lang)) {
241 241
                 $viewModel->setTemplate($this->getTemplate() . '.' . $lang);
242
-            }else{
242
+            } else{
243 243
                 $viewModel->setTemplate($this->getTemplate());
244 244
             }
245 245
 
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -38,15 +38,15 @@  discard block
 block discarded – undo
38 38
 
39 39
     protected $renderedBody;
40 40
 	
41
-	/**
42
-	 * HTMLTemplateMessage constructor.
43
-	 *
44
-	 * @param ContainerInterface $serviceManager
45
-	 * @param array $options
46
-	 */
41
+    /**
42
+     * HTMLTemplateMessage constructor.
43
+     *
44
+     * @param ContainerInterface $serviceManager
45
+     * @param array $options
46
+     */
47 47
     public function __construct(
48
-    	ContainerInterface $serviceManager,
49
-	    array $options = array()
48
+        ContainerInterface $serviceManager,
49
+        array $options = array()
50 50
     )
51 51
     {
52 52
         // @TODO make this multipart
@@ -266,11 +266,11 @@  discard block
 block discarded – undo
266 266
         return $this->renderedBody;
267 267
     }
268 268
 	
269
-	/**
270
-	 * @param ContainerInterface $container
271
-	 *
272
-	 * @return static
273
-	 */
269
+    /**
270
+     * @param ContainerInterface $container
271
+     *
272
+     * @return static
273
+     */
274 274
     public static function factory(ContainerInterface $container)
275 275
     {
276 276
         return new static($container);
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
      */
226 226
     public function renderBodyText($force = true, $forceLanguage = null)
227 227
     {
228
-        if (!$this->renderedBody || $force ) {
228
+        if (!$this->renderedBody || $force) {
229 229
             $viewModel    = new ViewModel();
230 230
             $response     = new Response();
231 231
             $body         = parent::getBodyText();
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
             }
235 235
 
236 236
             /* @var \Zend\Mvc\View\Http\ViewManager $viewManager */
237
-            $viewManager  = $this->serviceManager->get('ViewManager');
237
+            $viewManager = $this->serviceManager->get('ViewManager');
238 238
             $resolver = $this->serviceManager->get('ViewResolver');
239 239
 
240 240
             /* @var \Zend\Mvc\MvcEvent $event */
@@ -242,13 +242,13 @@  discard block
 block discarded – undo
242 242
             $lang = $forceLanguage ?: $event->getRouteMatch()->getParam('lang');
243 243
 
244 244
 
245
-            if ($resolver->resolve($this->getTemplate() . '.' . $lang)) {
246
-                $viewModel->setTemplate($this->getTemplate() . '.' . $lang);
247
-            }else{
245
+            if ($resolver->resolve($this->getTemplate().'.'.$lang)) {
246
+                $viewModel->setTemplate($this->getTemplate().'.'.$lang);
247
+            } else {
248 248
                 $viewModel->setTemplate($this->getTemplate());
249 249
             }
250 250
 
251
-            $view         = $viewManager->getView();
251
+            $view = $viewManager->getView();
252 252
 
253 253
             $viewModel->setVariables($this->getVariables());
254 254
             $viewModel->setVariable('mail', $this);
Please login to merge, or discard this patch.