@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $this->assertIsString($result); |
127 | 127 | $this->assertStringStartsWith('<input', $result); |
128 | 128 | $this->assertContains('type="file"', $result); |
129 | - $this->assertContains('name="' . $element->getName() . '"', $result); |
|
129 | + $this->assertContains('name="'.$element->getName().'"', $result); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | /** |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | $fileUploadHelper->expects($this->once()) |
224 | 224 | ->method('renderMarkup') |
225 | 225 | ->with($this->equalTo($element)) |
226 | - ->willReturn($markupOutput . $fileElementPlaceholder); |
|
226 | + ->willReturn($markupOutput.$fileElementPlaceholder); |
|
227 | 227 | $fileUploadHelper->expects($this->once()) |
228 | 228 | ->method('renderFileElement') |
229 | 229 | ->with($this->equalTo($element)) |
@@ -33,9 +33,9 @@ |
||
33 | 33 | |
34 | 34 | private $target = MetaDataFieldset::class; |
35 | 35 | |
36 | - private $inheritance = [ Fieldset::class ]; |
|
36 | + private $inheritance = [Fieldset::class]; |
|
37 | 37 | |
38 | 38 | private $properties = [ |
39 | - [ 'hydrator', ['default@' => MetaDataHydrator::class, '@value' => EntityHydrator::class]] |
|
39 | + ['hydrator', ['default@' => MetaDataHydrator::class, '@value' => EntityHydrator::class]] |
|
40 | 40 | ]; |
41 | 41 | } |
@@ -94,8 +94,8 @@ discard block |
||
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 |
||
154 | 154 | { |
155 | 155 | use ListenerAggregateTrait; |
156 | 156 | |
157 | - public $testEventsSpec =[]; |
|
157 | + public $testEventsSpec = []; |
|
158 | 158 | |
159 | 159 | protected function eventsProvider() |
160 | 160 | { |
@@ -43,7 +43,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -39,18 +39,18 @@ discard block |
||
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 |
||
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 |
@@ -17,7 +17,7 @@ discard block |
||
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 |
||
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', |
@@ -182,7 +182,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -27,24 +27,24 @@ |
||
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 | } |
@@ -45,7 +45,7 @@ discard block |
||
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 |
||
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 |
||
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 | } |