@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | $this->formElementManagerMock->expects($this->never())->method('getServiceLocator'); |
86 | 86 | $instance = $this->getMockForAbstractClass('\Core\Form\HeadscriptProviderInterface'); |
87 | 87 | $instance->expects($this->exactly(2)) |
88 | - ->method('getHeadscripts') |
|
89 | - ->will($this->onConsecutiveCalls('notanarray', array())); |
|
88 | + ->method('getHeadscripts') |
|
89 | + ->will($this->onConsecutiveCalls('notanarray', array())); |
|
90 | 90 | |
91 | 91 | $this->target->initialize($instance, $this->formElementManagerMock); |
92 | 92 | $this->target->initialize($instance, $this->formElementManagerMock); |
@@ -95,14 +95,14 @@ discard block |
||
95 | 95 | public function testInjectsScriptsToTheHeadscriptViewHelper() |
96 | 96 | { |
97 | 97 | $basepath = $this->getMockBuilder('\Zend\View\Helper\BasePath') |
98 | - ->disableOriginalConstructor()->getMock(); |
|
98 | + ->disableOriginalConstructor()->getMock(); |
|
99 | 99 | |
100 | 100 | $basepath->expects($this->any()) |
101 | - ->method('__invoke')->will($this->returnArgument(0)); |
|
101 | + ->method('__invoke')->will($this->returnArgument(0)); |
|
102 | 102 | |
103 | 103 | |
104 | 104 | $headscript = $this->getMockBuilder('\Zend\View\Helper\HeadScript') |
105 | - ->disableOriginalConstructor()->getMock(); |
|
105 | + ->disableOriginalConstructor()->getMock(); |
|
106 | 106 | |
107 | 107 | $scripts = array('test/script.js', 'yetanother/test/script.tst'); |
108 | 108 | |
@@ -111,9 +111,9 @@ discard block |
||
111 | 111 | $this->instanceMock = $instance; |
112 | 112 | |
113 | 113 | $headscript->expects($this->exactly(2)) |
114 | - ->method('__call')->withConsecutive( |
|
115 | - array('appendFile', array($scripts[0])), |
|
116 | - array('appendFile', array($scripts[1])) |
|
114 | + ->method('__call')->withConsecutive( |
|
115 | + array('appendFile', array($scripts[0])), |
|
116 | + array('appendFile', array($scripts[1])) |
|
117 | 117 | ); |
118 | 118 | |
119 | 119 | $helpers = $this->getMockBuilder('\Zend\View\HelperPluginManager') |
@@ -128,9 +128,9 @@ discard block |
||
128 | 128 | $services = $this->formElementManagerMock; |
129 | 129 | |
130 | 130 | $services->expects($this->exactly(1)) |
131 | - ->method('get') |
|
132 | - ->with('ViewHelperManager') |
|
133 | - ->willReturn($helpers) |
|
131 | + ->method('get') |
|
132 | + ->with('ViewHelperManager') |
|
133 | + ->willReturn($helpers) |
|
134 | 134 | ; |
135 | 135 | |
136 | 136 | $this->target->initialize($instance, $services); |
@@ -32,27 +32,27 @@ |
||
32 | 32 | public function propertiesProvider() |
33 | 33 | { |
34 | 34 | return [ |
35 | - [ 'summaryEmpty', [ |
|
35 | + ['summaryEmpty', [ |
|
36 | 36 | 'ignore_setter' => true, |
37 | - 'pre' => function () { |
|
37 | + 'pre' => function() { |
|
38 | 38 | $this->target->add(['name' => 'test', 'type' => 'text', 'attributes' => ['value'=>'test']]); |
39 | 39 | }, |
40 | 40 | 'value' => false, |
41 | 41 | 'getter_method' => 'is*' |
42 | 42 | ]], |
43 | - [ 'summaryEmpty', [ |
|
43 | + ['summaryEmpty', [ |
|
44 | 44 | 'ignore_setter' => true, |
45 | - 'pre' => function () { |
|
45 | + 'pre' => function() { |
|
46 | 46 | $this->target->add(['name' => 'test', 'type' => 'text']); |
47 | 47 | }, |
48 | 48 | 'value' => true, |
49 | 49 | 'getter_method' => 'is*', |
50 | 50 | ]], |
51 | - [ 'emptySummaryNotice', [ |
|
51 | + ['emptySummaryNotice', [ |
|
52 | 52 | 'value' => 'notice', |
53 | 53 | 'default' => null |
54 | 54 | ]], |
55 | - [ 'emptySummaryNotice', [ |
|
55 | + ['emptySummaryNotice', [ |
|
56 | 56 | 'value' => 'notice', |
57 | 57 | 'default' => 'defaultNotice', |
58 | 58 | ]], |
@@ -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 |
@@ -51,7 +51,7 @@ |
||
51 | 51 | ], |
52 | 52 | ]; |
53 | 53 | |
54 | - private $inheritance = [ AbstractHelper::class ]; |
|
54 | + private $inheritance = [AbstractHelper::class]; |
|
55 | 55 | |
56 | 56 | /** |
57 | 57 | * |
@@ -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 |
@@ -282,10 +282,10 @@ |
||
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 | } |
@@ -131,8 +131,8 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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) { |