Completed
Push — master ( 811327...4aef6e )
by Carsten
14:04 queued 19s
created
module/Core/test/CoreTest/EventManager/ListenerAggregateTraitTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
     public function invalidSpecProvider()
95 95
     {
96 96
         return [
97
-            [ [ 'invalid' ] ],
98
-            [ [ ['missing one'] ] ]
97
+            [['invalid']],
98
+            [[['missing one']]]
99 99
         ];
100 100
     }
101 101
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 {
155 155
     use ListenerAggregateTrait;
156 156
 
157
-    public $testEventsSpec =[];
157
+    public $testEventsSpec = [];
158 158
 
159 159
     protected function eventsProvider()
160 160
     {
Please login to merge, or discard this patch.
module/Core/test/CoreTest/EventManager/EventManager/TriggerTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $this->assertTrue($this->target->getEventCalled, 'No Event was created!');
44 44
 
45 45
         $this->target->getEventCalled = false;
46
-        $this->target->triggerUntil(function () {
46
+        $this->target->triggerUntil(function() {
47 47
         }, 'test', null, []);
48 48
         $this->assertTrue($this->target->getEventCalled, 'No Event was created (triggerUntil)');
49 49
     }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     {
53 53
         $event = new Event();
54 54
         $this->target->trigger($event);
55
-        $this->target->triggerUntil(function () {
55
+        $this->target->triggerUntil(function() {
56 56
         }, $event);
57 57
 
58 58
         $this->assertFalse($this->target->getEventCalled, 'An event was created!');
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     public function testCallbackIsPassedAlong()
62 62
     {
63 63
         $event = new Event();
64
-        $callback = function () {
64
+        $callback = function() {
65 65
         };
66 66
         $this->target->triggerUntil($callback, $event);
67 67
 
Please login to merge, or discard this patch.
module/Core/test/CoreTest/View/Helper/AjaxUrlTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,18 +39,18 @@  discard block
 block discarded – undo
39 39
     private $target = [
40 40
         AjaxUrl::class,
41 41
         [self::BASEPATH],
42
-        '@testInheritance' => [ 'as_reflection' => true ],
42
+        '@testInheritance' => ['as_reflection' => true],
43 43
         '@testConstruction' => false,
44 44
     ];
45 45
 
46
-    private $inheritance = [ AbstractHelper::class ];
46
+    private $inheritance = [AbstractHelper::class];
47 47
 
48 48
     public function testConstruction()
49 49
     {
50 50
         $basepath = '/test/path/no/slash';
51 51
         $target   = new AjaxUrl($basepath);
52 52
 
53
-        $this->assertAttributeSame($basepath . '/', 'basePath', $target);
53
+        $this->assertAttributeSame($basepath.'/', 'basePath', $target);
54 54
 
55 55
         $basepath = '/test/path/slash/';
56 56
         $target   = new AjaxUrl($basepath);
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     {
78 78
         $url = $this->target->__invoke(...$args);
79 79
 
80
-        $expect = self::BASEPATH . $expect;
80
+        $expect = self::BASEPATH.$expect;
81 81
         $this->assertEquals($expect, $url);
82 82
     }
83 83
 
Please login to merge, or discard this patch.
module/Core/test/CoreTest/View/Helper/ParamsTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
 class ParamsTest extends TestCase
19 19
 {
20
-    public function getHelper(MvcEvent $e=null)
20
+    public function getHelper(MvcEvent $e = null)
21 21
     {
22 22
         if (null == $e) {
23 23
             $e = new MvcEvent();
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     
53 53
     public function testFromFilesMethod()
54 54
     {
55
-        $_FILES=array(
55
+        $_FILES = array(
56 56
             'testFile1' => array(
57 57
                 'name' => 'testfile1.txt',
58 58
                 'type' => 'text/plain',
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
     public function testFromHeaderMethod()
77 77
     {
78 78
         $headers = "X-Test-Header-1: Header1Value\r\n"
79
-                 . "X-Test-Header-2: Header2Value\r\n";
79
+                    . "X-Test-Header-2: Header2Value\r\n";
80 80
         
81 81
         $r = new Request();
82 82
         $r->setHeaders(\Laminas\Http\Headers::fromString($headers));
Please login to merge, or discard this patch.
module/Core/test/CoreTestUtils/TestCase/SetupTargetTrait.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -282,10 +282,10 @@
 block discarded – undo
282 282
                         'return'  => isset($methodSpec['@return'])
283 283
                                      ? $call((array) $methodSpec['@return'])
284 284
                                      : (
285
-                                         isset($methodSpec['return'])
285
+                                            isset($methodSpec['return'])
286 286
                                         ? ('__self__' === $methodSpec['return'] ? $this->returnSelf() : $this->returnValue($methodSpec['return']))
287 287
                                         : null
288
-                                       ),
288
+                                        ),
289 289
                     ];
290 290
                 }
291 291
             }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
         $testName = array_shift($testNameParts);
132 132
         $testSet  = trim(array_pop($testNameParts), '"');
133 133
 
134
-        $testNameKey = '@' . $testName;
135
-        $testNameSetKey = $testNameKey . '|' . $testSet;
134
+        $testNameKey = '@'.$testName;
135
+        $testNameSetKey = $testNameKey.'|'.$testSet;
136 136
         $testSpec = isset($spec[$testNameKey]) ? $spec[$testNameKey] : (isset($spec[$testNameSetKey]) ? $spec[$testNameSetKey] : null);
137 137
 
138 138
         if (null === $testSpec) {
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
                     continue;
142 142
                 }
143 143
 
144
-                if (preg_match('~^' . str_replace('*', '.*', substr($testSpecPattern, 1)) . '~', $testName)) {
144
+                if (preg_match('~^'.str_replace('*', '.*', substr($testSpecPattern, 1)).'~', $testName)) {
145 145
                     $testSpec = $spec[$testSpecPattern];
146 146
                     break;
147 147
                 }
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                 if (isset($spec[$testSpec])) {
159 159
                     $testSpec = $spec[$testSpec];
160 160
                 } elseif (class_exists($testSpec)) {
161
-                    $testSpec = [ $testSpec ];
161
+                    $testSpec = [$testSpec];
162 162
                 } else {
163 163
                     $this->target = $this->{$testSpec}();
164 164
                     return;
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 
190 190
         if (!isset($spec['class'])) {
191 191
             if (!isset($spec[0])) {
192
-                throw new \PHPUnit_Framework_Exception(__TRAIT__ . ': No target class name specified.');
192
+                throw new \PHPUnit_Framework_Exception(__TRAIT__.': No target class name specified.');
193 193
             }
194 194
             $spec['class'] = $spec[0];
195 195
         }
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
         if (is_string($spec)) {
251 251
             $mock = $this->$spec();
252 252
         } else {
253
-            $call = function ($spec) {
253
+            $call = function($spec) {
254 254
                 $cb   = [$this, $spec[0]];
255 255
                 $args = isset($spec[1]) ? (array) $spec[1] : [];
256 256
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
             };
259 259
 
260 260
             $methods = [];
261
-            $methodMocks  = [];
261
+            $methodMocks = [];
262 262
 
263 263
             if (is_array($spec)) {
264 264
                 foreach ($spec as $method => $methodSpec) {
Please login to merge, or discard this patch.
module/Core/test/CoreTestUtils/TestCase/TestSetterGetterTrait.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         $errTmpl = __METHOD__ . ': ' . get_class($this);
186 186
         if (!property_exists($this, 'target') || (!is_object($this->target) && !isset($spec['target']))) {
187 187
             throw new PHPUnitException($errTmpl
188
-                                                   . ' must define the property "target" and the value must be an object.');
188
+                                                    . ' must define the property "target" and the value must be an object.');
189 189
         }
190 190
 
191 191
         if (!is_array($spec)) {
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
         }
400 400
 
401 401
         $err = __TRAIT__ . ': ' . get_class($this) . ': Setter ' . get_class($this->target) . '::' . $setter
402
-               . ($expect === $this->target ? ' breaks fluent interface.' : ' does not return expected value.');
402
+                . ($expect === $this->target ? ' breaks fluent interface.' : ' does not return expected value.');
403 403
 
404 404
 
405 405
         if (false === $args) {
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
      */
183 183
     public function testSetterAndGetter($name, $spec)
184 184
     {
185
-        $errTmpl = __METHOD__ . ': ' . get_class($this);
185
+        $errTmpl = __METHOD__.': '.get_class($this);
186 186
         if (!property_exists($this, 'target') || (!is_object($this->target) && !isset($spec['target']))) {
187 187
             throw new PHPUnitException($errTmpl
188 188
                                                    . ' must define the property "target" and the value must be an object.');
@@ -197,13 +197,13 @@  discard block
 block discarded – undo
197 197
         } elseif (isset($spec['value']) && is_string($spec['value']) && 0 === strpos($spec['value'], '@')) {
198 198
             $spec['value'] = InstanceCreator::newClass($spec['value']);
199 199
         } elseif (isset($spec['value@'])) {
200
-            $spec['value'] = '@' . $spec['value@'];
200
+            $spec['value'] = '@'.$spec['value@'];
201 201
         }
202 202
 
203 203
         /* Value could be 'null', so we need to use array_key_exists here. */
204 204
         if (!array_key_exists('value', $spec)) {
205 205
             if (!array_key_exists('default', $spec) && !array_key_exists('@default', $spec) && !array_key_exists('default@', $spec)) {
206
-                throw new PHPUnitException($errTmpl . ': Specification must contain the key "value" or "default".');
206
+                throw new PHPUnitException($errTmpl.': Specification must contain the key "value" or "default".');
207 207
             }
208 208
 
209 209
             $spec['value'] = null;
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
         if (isset($spec['@default'])) {
221 221
             $spec['default'] = InstanceCreator::fromSpec($spec['@default'], InstanceCreator::FORCE_INSTANTIATION);
222 222
         } elseif (isset($spec['default@'])) {
223
-            $spec['default'] = '@' . $spec['default@'];
223
+            $spec['default'] = '@'.$spec['default@'];
224 224
         }
225 225
 
226 226
 
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
      */
336 336
     private function _setterGetter_assertGetterValue($getter, $value, $args, $assert, $isDefaultValue = false)
337 337
     {
338
-        $err    = sprintf(
338
+        $err = sprintf(
339 339
             '%s: %s: %s for %s::%s is not as expected',
340 340
             __TRAIT__,
341 341
             get_class($this),
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
                 break;
370 370
 
371 371
             case "boolean":
372
-                $method = 'assert' . ($value ? 'True' : 'False');
372
+                $method = 'assert'.($value ? 'True' : 'False');
373 373
                 $this->$method($returned, $err);
374 374
                 break;
375 375
 
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
             $expect = $this->target;
399 399
         }
400 400
 
401
-        $err = __TRAIT__ . ': ' . get_class($this) . ': Setter ' . get_class($this->target) . '::' . $setter
401
+        $err = __TRAIT__.': '.get_class($this).': Setter '.get_class($this->target).'::'.$setter
402 402
                . ($expect === $this->target ? ' breaks fluent interface.' : ' does not return expected value.');
403 403
 
404 404
 
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
                 break;
429 429
 
430 430
             case "boolean":
431
-                $method = 'assert' . ($expect ? 'True' : 'False');
431
+                $method = 'assert'.($expect ? 'True' : 'False');
432 432
                 $this->$method($returned, $err);
433 433
                 break;
434 434
 
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
      */
448 448
     private function _setterGetter_assertPropertyValue($name, $value, $assert)
449 449
     {
450
-        $err = __TRAIT__ . ': ' . get_class($this) . ': Property ' . $name . ' does not have expected value.';
450
+        $err = __TRAIT__.': '.get_class($this).': Property '.$name.' does not have expected value.';
451 451
 
452 452
         $propertyName = $name;
453 453
 
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
             if (!is_callable($method)) {
506 506
                 $method = [$this, $method];
507 507
                 if (!is_callable($method)) {
508
-                    throw new \UnexpectedValueException('Invalid callback for "' . $type . '" hook.');
508
+                    throw new \UnexpectedValueException('Invalid callback for "'.$type.'" hook.');
509 509
                 }
510 510
             }
511 511
             $cb = $method;
@@ -517,10 +517,10 @@  discard block
 block discarded – undo
517 517
         }
518 518
 
519 519
         if (false === $args) {
520
-            $args = [ $spec ];
520
+            $args = [$spec];
521 521
         } else {
522 522
             $args = array_map(
523
-                function ($item) use ($spec) {
523
+                function($item) use ($spec) {
524 524
                     if ('###' == $item) {
525 525
                         return $spec;
526 526
                     }
Please login to merge, or discard this patch.
module/Core/test/CoreTestUtils/TestCase/InitValueTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,24 +27,24 @@
 block discarded – undo
27 27
     {
28 28
         /* @var $this \PHPUnit\Framework\TestCase */
29 29
 
30
-        $getter = 'get' . $propName;
30
+        $getter = 'get'.$propName;
31 31
         if (is_object($expectedValue)) {
32 32
             $this->assertInstanceOf(
33 33
                 get_class($expectedValue),
34 34
                 $object->$getter(),
35
-                '::' . $getter . '() init value should return a type of ' . get_class($expectedValue)
35
+                '::'.$getter.'() init value should return a type of '.get_class($expectedValue)
36 36
             );
37 37
         } elseif (is_array($expectedValue)) {
38 38
             $this->assertSame(
39 39
                 $expectedValue,
40 40
                 $object->$getter(),
41
-                '::' . $getter . '() init value should return an empty array'
41
+                '::'.$getter.'() init value should return an empty array'
42 42
             );
43 43
         } else {
44 44
             $this->assertEquals(
45 45
                 $expectedValue,
46 46
                 $object->$getter(),
47
-                '::' . $getter . '() init value should return ' . $expectedValue
47
+                '::'.$getter.'() init value should return '.$expectedValue
48 48
             );
49 49
         }
50 50
     }
Please login to merge, or discard this patch.
module/Core/test/CoreTestUtils/TestCase/TestDefaultAttributesTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     {
46 46
         if (!property_exists($this, 'target') || !is_object($this->target)) {
47 47
             throw new \PHPUnit_Framework_Exception(
48
-                self::class . ': ' . static::class
48
+                self::class.': '.static::class
49 49
                 . ' must define the property $target and its value must be an object.'
50 50
             );
51 51
         }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
         if (!is_array($attributes)) {
57 57
             throw new \PHPUnit_Framework_Exception(
58
-                self::class . ': ' . static::class . ': Invalid format of attributes. Must be an array of attribute => value pairs.'
58
+                self::class.': '.static::class.': Invalid format of attributes. Must be an array of attribute => value pairs.'
59 59
             );
60 60
         }
61 61
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     {
67 67
         if (!property_exists($this, 'attributes')) {
68 68
             throw new \PHPUnit_Framework_Exception(
69
-                self::class . ': ' . static::class
69
+                self::class.': '.static::class
70 70
                 . ' must define the property $attributes with an array of attribute => value pairs.'
71 71
             );
72 72
         }
Please login to merge, or discard this patch.
module/Core/test/CoreTestUtils/Constraint/UsesTraits.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
     protected function failureDescription($other): string
81 81
     {
82 82
         $name = $other instanceof \ReflectionClass ? $other->getName() : (is_string($other) ? $other : get_class($other));
83
-        return $name . ' ' . $this->toString();
83
+        return $name.' '.$this->toString();
84 84
     }
85 85
 
86 86
     protected function additionalFailureDescription($other): string
Please login to merge, or discard this patch.