Passed
Push — master ( 6292f6...e5b7ab )
by Mathias
10:49 queued 04:59
created
module/Applications/src/Form/SettingsFieldset.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
             array('type' => 'Laminas\Form\Element\Textarea',
70 70
                         'name' => 'mailConfirmationText',
71 71
                          'options' => array('label' => /* @translate */ 'Confirmation mail text',
72
-                                            'description' => /* @translate */ 'default text of the acknowledgment of receipt mail to the applicant. The following variables can be used:<br><ul><li>##anrede_formell## = salutation. Includes gender, firstname and lastname.<li>##anrede_informell## = salutation. Includes fistname and lastname.</li><li>##job_title## = title of the jobs</li><li>##name## = name of the applicant.</li><li>##date## = date of recipt of the application.</li><li>##link## = Link to the application details</li></ul>' ))
72
+                                            'description' => /* @translate */ 'default text of the acknowledgment of receipt mail to the applicant. The following variables can be used:<br><ul><li>##anrede_formell## = salutation. Includes gender, firstname and lastname.<li>##anrede_informell## = salutation. Includes fistname and lastname.</li><li>##job_title## = title of the jobs</li><li>##name## = name of the applicant.</li><li>##date## = date of recipt of the application.</li><li>##link## = Link to the application details</li></ul>'))
73 73
         );
74 74
         
75 75
         $this->add(
Please login to merge, or discard this patch.
module/Core/src/Listener/NotificationListener.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,12 +42,12 @@
 block discarded – undo
42 42
      */
43 43
     public function attachShared(SharedEventManagerInterface $events)
44 44
     {
45
-        $events->attach('*', NotificationEvent::EVENT_NOTIFICATION_ADD, array($this,'add'), 1);
46
-        $events->attach('Laminas\Mvc\Application', MvcEvent::EVENT_DISPATCH, array($this,'renderJSON'), -240);
47
-        $events->attach('Laminas\Mvc\Application', MvcEvent::EVENT_DISPATCH, array($this,'renderHTML'), -250);
45
+        $events->attach('*', NotificationEvent::EVENT_NOTIFICATION_ADD, array($this, 'add'), 1);
46
+        $events->attach('Laminas\Mvc\Application', MvcEvent::EVENT_DISPATCH, array($this, 'renderJSON'), -240);
47
+        $events->attach('Laminas\Mvc\Application', MvcEvent::EVENT_DISPATCH, array($this, 'renderHTML'), -250);
48 48
         // Sometimes the Dispatch-Event is not reached, for instance with a route-direct
49 49
         // but also for Events, that are happening after the Dispatch
50
-        $events->attach('Laminas\Mvc\Application', MvcEvent::EVENT_FINISH, array($this,'renderHTML'), -250);
50
+        $events->attach('Laminas\Mvc\Application', MvcEvent::EVENT_FINISH, array($this, 'renderHTML'), -250);
51 51
         return $this;
52 52
     }
53 53
 
Please login to merge, or discard this patch.
module/Core/src/Controller/Plugin/CreatePaginatorService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,11 +62,11 @@
 block discarded – undo
62 62
         $paginatorManager = $this->serviceManager->get('Core/PaginatorService');
63 63
         $paginator = $paginatorManager->get($paginatorName);
64 64
         if (!isset($paginator) || !$paginator instanceof LaminasPaginator) {
65
-            throw new \RuntimeException('Could not create paginator ' . $paginatorName);
65
+            throw new \RuntimeException('Could not create paginator '.$paginatorName);
66 66
         }
67 67
         $adapter = $paginator->getAdapter();
68 68
         if (!isset($adapter) || !$adapter instanceof AdapterInterface) {
69
-            throw new \RuntimeException('Paginator ' . $paginatorName . ' has no Adapter');
69
+            throw new \RuntimeException('Paginator '.$paginatorName.' has no Adapter');
70 70
         }
71 71
 
72 72
         $params     = $usePostParams
Please login to merge, or discard this patch.
module/Core/src/Mail/HTMLTemplateMessage.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
             }
234 234
 
235 235
             /* @var \Laminas\Mvc\View\Http\ViewManager $viewManager */
236
-            $viewManager  = $this->serviceManager->get('ViewManager');
236
+            $viewManager = $this->serviceManager->get('ViewManager');
237 237
             $resolver = $this->serviceManager->get('ViewResolver');
238 238
 
239 239
             /* @var \Laminas\Mvc\MvcEvent $event */
@@ -241,13 +241,13 @@  discard block
 block discarded – undo
241 241
             $lang = $forceLanguage ?: $event->getRouteMatch()->getParam('lang');
242 242
 
243 243
 
244
-            if ($resolver->resolve($this->getTemplate() . '.' . $lang)) {
245
-                $viewModel->setTemplate($this->getTemplate() . '.' . $lang);
244
+            if ($resolver->resolve($this->getTemplate().'.'.$lang)) {
245
+                $viewModel->setTemplate($this->getTemplate().'.'.$lang);
246 246
             } else {
247 247
                 $viewModel->setTemplate($this->getTemplate());
248 248
             }
249 249
 
250
-            $view         = $viewManager->getView();
250
+            $view = $viewManager->getView();
251 251
 
252 252
             $viewModel->setVariables($this->getVariables());
253 253
             $viewModel->setVariable('mail', $this);
Please login to merge, or discard this patch.
module/Core/src/Factory/View/Helper/SocialButtonsFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         /* @var $serviceLocator \Laminas\View\HelperPluginManager */
31 31
         $options = $container->get('Auth/Options');
32 32
         $config = $container->get('Config');
33
-        $helper = new SocialButtons($options,$config);
33
+        $helper = new SocialButtons($options, $config);
34 34
         return $helper;
35 35
     }
36 36
 }
Please login to merge, or discard this patch.
module/Core/src/Factory/EventManager/EventManagerAbstractFactory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         $defaults = [
183 183
             'service' => 'EventManager',
184 184
             'configure' => true,
185
-            'identifiers' => [ $name ],
185
+            'identifiers' => [$name],
186 186
             'event' => '\Laminas\EventManager\Event',
187 187
             'listeners' => [],
188 188
         ];
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
             }
298 298
 
299 299
             foreach ($options['attach'] as $spec) {
300
-                $callback = $spec['method'] ? [ $listener, $spec['method'] ] : $listener;
300
+                $callback = $spec['method'] ? [$listener, $spec['method']] : $listener;
301 301
                 $eventManager->attach($spec['event'], $callback, $spec['priority']);
302 302
             }
303 303
         }
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 
367 367
         if (is_string($options)) {
368 368
             /* Only an event name is provided in config */
369
-            $normalized['attach'] = [ [ 'event' => $options, 'method' => null, 'priority' => 1 ] ];
369
+            $normalized['attach'] = [['event' => $options, 'method' => null, 'priority' => 1]];
370 370
             return $normalized;
371 371
         }
372 372
 
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
             } elseif (is_string($opt)) {
392 392
                 if (null === $event) {
393 393
                     /* first string found is assumed to be the event name */
394
-                    $event = [ $opt ];
394
+                    $event = [$opt];
395 395
                 } else {
396 396
                     /* second string found must be a method name. */
397 397
                     $method = $opt;
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
         }
407 407
 
408 408
         foreach ($event as &$eventSpec) {
409
-            $eventSpec = [ 'event' => $eventSpec, 'method' => $method, 'priority' => $priority ];
409
+            $eventSpec = ['event' => $eventSpec, 'method' => $method, 'priority' => $priority];
410 410
         }
411 411
 
412 412
         $normalized['attach'] = $event;
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
     protected function normalizeEventsSpec($options)
419 419
     {
420 420
         $listenerPriority = isset($options['priority']) ? $options['priority'] : 1;
421
-        $listenerMethod   = isset($options['method'])   ? $options['method']   : '__none__';
421
+        $listenerMethod   = isset($options['method']) ? $options['method'] : '__none__';
422 422
         $events = [];
423 423
 
424 424
         foreach ($options['events'] as $event => $spec) {
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
             } elseif (is_array($spec)) {
434 434
                 if (isset($spec['method'])) {
435 435
                     if (!is_array($spec['method'])) {
436
-                        $spec['method'] = [ $spec['method'] ];
436
+                        $spec['method'] = [$spec['method']];
437 437
                     }
438 438
 
439 439
                     foreach ($spec['method'] as $method => $methodPriority) {
Please login to merge, or discard this patch.
module/Core/src/Form/View/Helper/FormRow.php 1 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/test/CoreTest/EventManager/EventManager/BaseTest.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     protected $target = '\Core\EventManager\EventManager';
35 35
 
36
-    protected $inheritance = [ '\Laminas\EventManager\EventManager', '\Core\EventManager\EventProviderInterface' ];
36
+    protected $inheritance = ['\Laminas\EventManager\EventManager', '\Core\EventManager\EventProviderInterface'];
37 37
 
38 38
     public function testSetEventPrototype()
39 39
     {
@@ -46,23 +46,23 @@  discard block
 block discarded – undo
46 46
     {
47 47
         $testTarget = new \stdClass();
48 48
         $testTarget2 = new \stdClass();
49
-        $testParams1 = [ 'params1' => 'value1' ];
50
-        $testParams2 = [ 'name' => 'test6', 'param2' => 'value2' ];
51
-        $testParams3 = [ 'name' => 'test8', 'target' => $testTarget, 'param3' => 'value3' ];
52
-        $expect2     = [ 'param2' => 'value2' ];
53
-        $expect3     = [ 'param3' => 'value3' ];
49
+        $testParams1 = ['params1' => 'value1'];
50
+        $testParams2 = ['name' => 'test6', 'param2' => 'value2'];
51
+        $testParams3 = ['name' => 'test8', 'target' => $testTarget, 'param3' => 'value3'];
52
+        $expect2     = ['param2' => 'value2'];
53
+        $expect3     = ['param3' => 'value3'];
54 54
 
55 55
         return [
56
-            [ 'test1', null, [], [ 'name' => 'test1', 'target' => null, 'params' => []]],
57
-            [ 'test2', $testTarget, [], [ 'name' => 'test2', 'target' => $testTarget, 'params' => []]],
58
-            [ 'test3', null, $testParams1, [ 'name' => 'test3', 'target' => null, 'params' => $testParams1]],
59
-            'setParamsAsFirstArg' => [ $testParams1, null, ['ignoreme' => 'yes' ], [ 'name' => null, 'target' => null, 'params' => $testParams1 ]],
60
-            'setParamsAsSecondArg' => [ 'test5', $testParams1, ['ignoreme' => 'yes' ], ['name' => 'test5', 'target' => null, 'params' => $testParams1 ]],
61
-            'setNameInParamsAsFirstArg' => [ $testParams2, null, [], [ 'name' => 'test6', 'target' => null, 'params' => $expect2]],
62
-            'setNameInParamsAsFirstArgAndTarget' => [ $testParams2, $testTarget, ['ignoreme' => 'yes'], [ 'name' => 'test6', 'target' => $testTarget, 'params' => $expect2]],
63
-            'setNameAndTargetInParams' => [ $testParams3, null, [], [ 'name' => 'test8', 'target' => $testTarget, 'params' => $expect3]],
64
-            [ 'test9', $testTarget2, $testParams3, ['name' => 'test9', 'target' => $testTarget2, 'params' => $testParams3 ]],
65
-            [ null, $testParams2, [], ['name' => 'test6', 'target' => null, 'params' => $expect2 ]],
56
+            ['test1', null, [], ['name' => 'test1', 'target' => null, 'params' => []]],
57
+            ['test2', $testTarget, [], ['name' => 'test2', 'target' => $testTarget, 'params' => []]],
58
+            ['test3', null, $testParams1, ['name' => 'test3', 'target' => null, 'params' => $testParams1]],
59
+            'setParamsAsFirstArg' => [$testParams1, null, ['ignoreme' => 'yes'], ['name' => null, 'target' => null, 'params' => $testParams1]],
60
+            'setParamsAsSecondArg' => ['test5', $testParams1, ['ignoreme' => 'yes'], ['name' => 'test5', 'target' => null, 'params' => $testParams1]],
61
+            'setNameInParamsAsFirstArg' => [$testParams2, null, [], ['name' => 'test6', 'target' => null, 'params' => $expect2]],
62
+            'setNameInParamsAsFirstArgAndTarget' => [$testParams2, $testTarget, ['ignoreme' => 'yes'], ['name' => 'test6', 'target' => $testTarget, 'params' => $expect2]],
63
+            'setNameAndTargetInParams' => [$testParams3, null, [], ['name' => 'test8', 'target' => $testTarget, 'params' => $expect3]],
64
+            ['test9', $testTarget2, $testParams3, ['name' => 'test9', 'target' => $testTarget2, 'params' => $testParams3]],
65
+            [null, $testParams2, [], ['name' => 'test6', 'target' => null, 'params' => $expect2]],
66 66
 
67 67
         ];
68 68
     }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Listener/DeferredListenerAggregateTest.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         '@testFactoryMethodReturnsInstance' => false
42 42
     ];
43 43
 
44
-    protected $inheritance = [ '\Laminas\EventManager\ListenerAggregateInterface' ];
44
+    protected $inheritance = ['\Laminas\EventManager\ListenerAggregateInterface'];
45 45
     
46 46
     protected $services;
47 47
 
@@ -56,39 +56,39 @@  discard block
 block discarded – undo
56 56
     public function propertiesProvider()
57 57
     {
58 58
         return [
59
-            [ 'listeners', [
60
-                'value' => [ [] ],
61
-                'setter_exception' => [ '\DomainException', 'Listener specification must be an array' ]
59
+            ['listeners', [
60
+                'value' => [[]],
61
+                'setter_exception' => ['\DomainException', 'Listener specification must be an array']
62 62
             ]],
63
-            [ 'listeners', [
64
-                'value' => [ [ 'event' => 'test' ] ],
65
-                'setter_exception' => [ '\DomainException', 'Listener specification must be an array' ]
63
+            ['listeners', [
64
+                'value' => [['event' => 'test']],
65
+                'setter_exception' => ['\DomainException', 'Listener specification must be an array']
66 66
             ]],
67
-            [ 'listeners', [
68
-                'value' => [ [ 'service' => 'test' ] ],
69
-                'setter_exception' => [ '\DomainException', 'Listener specification must be an array' ]
67
+            ['listeners', [
68
+                'value' => [['service' => 'test']],
69
+                'setter_exception' => ['\DomainException', 'Listener specification must be an array']
70 70
             ]],
71
-            [ 'listeners', [
72
-                'value' => [ [ 'event' => 'test', 'service' => 'service' ] ],
71
+            ['listeners', [
72
+                'value' => [['event' => 'test', 'service' => 'service']],
73 73
                 'ignore_getter' => true,
74
-                'post' => ['assertListenerSpecsProperty', [ '', '@target', '###' ] ],
74
+                'post' => ['assertListenerSpecsProperty', ['', '@target', '###']],
75 75
             ]],
76
-            [ 'listeners', [
77
-                'value' => [ [ 'event' => 'test2', 'service' => 'someClass', 'method' => 'method', 'priority' => 12 ] ],
76
+            ['listeners', [
77
+                'value' => [['event' => 'test2', 'service' => 'someClass', 'method' => 'method', 'priority' => 12]],
78 78
                 'ignore_getter' => true,
79
-                'post' => ['assertListenerSpecsProperty', [ '', '@target', '###' ] ],
79
+                'post' => ['assertListenerSpecsProperty', ['', '@target', '###']],
80 80
             ]],
81
-            [ 'listener', [
81
+            ['listener', [
82 82
                 'value' => 'test',
83
-                'setter_args' => [ 'service', 'method', 10 ],
84
-                'setter_value' => [ 'event' => 'test', 'service' => 'service', 'method' => 'method', 'priority' => 10, 'instance' => null ],
83
+                'setter_args' => ['service', 'method', 10],
84
+                'setter_value' => ['event' => 'test', 'service' => 'service', 'method' => 'method', 'priority' => 10, 'instance' => null],
85 85
                 'setter_assert' => 'assertListenerSpecsProperty',
86 86
                 'ignore_getter' => true,
87 87
             ]],
88
-            [ 'listener', [
88
+            ['listener', [
89 89
                 'value' => 'test',
90
-                'setter_args' => [ 'service', 10 ],
91
-                'setter_value' => [ 'event' => 'test', 'service' => 'service', 'method' => null, 'priority' => 10, 'instance' => null ],
90
+                'setter_args' => ['service', 10],
91
+                'setter_value' => ['event' => 'test', 'service' => 'service', 'method' => null, 'priority' => 10, 'instance' => null],
92 92
                 'setter_assert' => 'assertListenerSpecsProperty',
93 93
                 'ignore_getter' => true,
94 94
             ]]
@@ -132,20 +132,20 @@  discard block
 block discarded – undo
132 132
         $this->target->setListener('test02', 'service02', 10);
133 133
         
134 134
         //In ZF3 EventManager detach should be a callable or it will throws an error
135
-        $callback = [$testListener,'callback'];
135
+        $callback = [$testListener, 'callback'];
136 136
         $events = $this->getMockBuilder(EventManager::class)
137 137
             ->setMethods(['attach', 'detach'])
138 138
             ->getMock();
139 139
         $events->expects($this->exactly(2))
140 140
             ->method('attach')
141 141
             ->withConsecutive(
142
-                [ $this->equalTo('test01'), $this->anything(), $this->equalTo(0) ],
143
-                [ $this->equalTo('test02'), $this->anything(), $this->equalTo(10) ]
142
+                [$this->equalTo('test01'), $this->anything(), $this->equalTo(0)],
143
+                [$this->equalTo('test02'), $this->anything(), $this->equalTo(10)]
144 144
             )
145 145
             ->will(
146 146
                 $this->onConsecutiveCalls(
147
-                [$testListener,'callback'],
148
-                [$testListener,'callback']
147
+                [$testListener, 'callback'],
148
+                [$testListener, 'callback']
149 149
             )
150 150
             );
151 151
 
@@ -186,13 +186,13 @@  discard block
 block discarded – undo
186 186
     public function listenerProvider()
187 187
     {
188 188
         return [
189
-            [ 'nonExistant', null ],
190
-            [ '\CoreTest\Listener\DLATListenerMock', null ],
191
-            [ 'listener', new DLATListenerMock() ],
192
-            [ 'listener', new DLATListenerMock(), 'invoke' ],
193
-            [ 'listener', new DLATListenerMock(), 'method', 'callback' ],
194
-            [ 'listener', new DLATListenerMock(), 'methodButNone', 'noMethod' ],
195
-            [ 'listener', new DLATNonInvokableListenerMock() ],
189
+            ['nonExistant', null],
190
+            ['\CoreTest\Listener\DLATListenerMock', null],
191
+            ['listener', new DLATListenerMock()],
192
+            ['listener', new DLATListenerMock(), 'invoke'],
193
+            ['listener', new DLATListenerMock(), 'method', 'callback'],
194
+            ['listener', new DLATListenerMock(), 'methodButNone', 'noMethod'],
195
+            ['listener', new DLATNonInvokableListenerMock()],
196 196
         ];
197 197
     }
198 198
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         if (null === $listener) {
212 212
             if (!class_exists($service, true)) {
213 213
                 $this->expectException('\UnexpectedValueException');
214
-                $this->expectExceptionMessage('Cannot create deferred listener "' . $service);
214
+                $this->expectExceptionMessage('Cannot create deferred listener "'.$service);
215 215
             }
216 216
             $this->services->expects($this->once())->method('has')->with($service)->willReturn(false);
217 217
             $this->services->expects($this->never())->method('get');
Please login to merge, or discard this patch.