@@ -32,7 +32,7 @@ |
||
32 | 32 | foreach ($suite->getGroupDetails() as $group => $tests) { |
33 | 33 | if (\in_array($group, $groups)) { |
34 | 34 | $testHashes = \array_map( |
35 | - function ($test) { |
|
35 | + function($test) { |
|
36 | 36 | return \spl_object_hash($test); |
37 | 37 | }, |
38 | 38 | $tests |
@@ -336,25 +336,25 @@ discard block |
||
336 | 336 | unset($sections['FILEEOF']); |
337 | 337 | } |
338 | 338 | |
339 | - $testDirectory = \dirname($this->filename) . DIRECTORY_SEPARATOR; |
|
339 | + $testDirectory = \dirname($this->filename).DIRECTORY_SEPARATOR; |
|
340 | 340 | |
341 | 341 | foreach ($allowExternalSections as $section) { |
342 | - if (isset($sections[$section . '_EXTERNAL'])) { |
|
343 | - $externalFilename = \trim($sections[$section . '_EXTERNAL']); |
|
342 | + if (isset($sections[$section.'_EXTERNAL'])) { |
|
343 | + $externalFilename = \trim($sections[$section.'_EXTERNAL']); |
|
344 | 344 | |
345 | - if (!\is_file($testDirectory . $externalFilename) || !\is_readable($testDirectory . $externalFilename)) { |
|
345 | + if (!\is_file($testDirectory.$externalFilename) || !\is_readable($testDirectory.$externalFilename)) { |
|
346 | 346 | throw new Exception( |
347 | 347 | \sprintf( |
348 | 348 | 'Could not load --%s-- %s for PHPT file', |
349 | - $section . '_EXTERNAL', |
|
350 | - $testDirectory . $externalFilename |
|
349 | + $section.'_EXTERNAL', |
|
350 | + $testDirectory.$externalFilename |
|
351 | 351 | ) |
352 | 352 | ); |
353 | 353 | } |
354 | 354 | |
355 | - $sections[$section] = \file_get_contents($testDirectory . $externalFilename); |
|
355 | + $sections[$section] = \file_get_contents($testDirectory.$externalFilename); |
|
356 | 356 | |
357 | - unset($sections[$section . '_EXTERNAL']); |
|
357 | + unset($sections[$section.'_EXTERNAL']); |
|
358 | 358 | } |
359 | 359 | } |
360 | 360 | |
@@ -414,8 +414,8 @@ discard block |
||
414 | 414 | '__FILE__' |
415 | 415 | ], |
416 | 416 | [ |
417 | - "'" . \dirname($this->filename) . "'", |
|
418 | - "'" . $this->filename . "'" |
|
417 | + "'".\dirname($this->filename)."'", |
|
418 | + "'".$this->filename."'" |
|
419 | 419 | ], |
420 | 420 | $code |
421 | 421 | ); |
@@ -64,11 +64,11 @@ |
||
64 | 64 | if ($ms >= $value) { |
65 | 65 | $time = floor($ms / $value * 100.0) / 100.0; |
66 | 66 | |
67 | - return $time . ' ' . ($time == 1 ? $unit : $unit . 's'); |
|
67 | + return $time.' '.($time == 1 ? $unit : $unit.'s'); |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 | |
71 | - return $ms . ' ms'; |
|
71 | + return $ms.' ms'; |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | ->method('doSomethingElse') |
590 | 590 | ->will( |
591 | 591 | $this->returnCallback( |
592 | - function () use (&$actualArguments) { |
|
592 | + function() use (&$actualArguments) { |
|
593 | 593 | $actualArguments = func_get_args(); |
594 | 594 | } |
595 | 595 | ) |
@@ -617,7 +617,7 @@ discard block |
||
617 | 617 | ->method('doSomethingElse') |
618 | 618 | ->will( |
619 | 619 | $this->returnCallback( |
620 | - function () use (&$actualArguments) { |
|
620 | + function() use (&$actualArguments) { |
|
621 | 621 | $actualArguments = func_get_args(); |
622 | 622 | } |
623 | 623 | ) |
@@ -799,8 +799,8 @@ discard block |
||
799 | 799 | $this->fail('Expected exception'); |
800 | 800 | } catch (ExpectationFailedException $e) { |
801 | 801 | $this->assertSame( |
802 | - "Expectation failed for method name is equal to <string:right> when invoked 1 time(s)\n" . |
|
803 | - "Parameter count for invocation SomeClass::right() is too low.\n" . |
|
802 | + "Expectation failed for method name is equal to <string:right> when invoked 1 time(s)\n". |
|
803 | + "Parameter count for invocation SomeClass::right() is too low.\n". |
|
804 | 804 | 'To allow 0 or more parameters with any value, omit ->with() or use ->withAnyParameters() instead.', |
805 | 805 | $e->getMessage() |
806 | 806 | ); |
@@ -844,7 +844,7 @@ discard block |
||
844 | 844 | $foo->expects($this->any()) |
845 | 845 | ->method('bar') |
846 | 846 | ->will($this->returnCallback( |
847 | - function (&$a, &$b, $c) { |
|
847 | + function(&$a, &$b, $c) { |
|
848 | 848 | $b = 1; |
849 | 849 | } |
850 | 850 | )); |
@@ -905,7 +905,7 @@ discard block |
||
905 | 905 | */ |
906 | 906 | public function testCreateMockFromWsdl() |
907 | 907 | { |
908 | - $mock = $this->getMockFromWsdl(__DIR__ . '/_fixture/GoogleSearch.wsdl', 'WsdlMock'); |
|
908 | + $mock = $this->getMockFromWsdl(__DIR__.'/_fixture/GoogleSearch.wsdl', 'WsdlMock'); |
|
909 | 909 | |
910 | 910 | $this->assertStringStartsWith( |
911 | 911 | 'Mock_WsdlMock_', |
@@ -918,7 +918,7 @@ discard block |
||
918 | 918 | */ |
919 | 919 | public function testCreateNamespacedMockFromWsdl() |
920 | 920 | { |
921 | - $mock = $this->getMockFromWsdl(__DIR__ . '/_fixture/GoogleSearch.wsdl', 'My\\Space\\WsdlMock'); |
|
921 | + $mock = $this->getMockFromWsdl(__DIR__.'/_fixture/GoogleSearch.wsdl', 'My\\Space\\WsdlMock'); |
|
922 | 922 | |
923 | 923 | $this->assertStringStartsWith( |
924 | 924 | 'Mock_WsdlMock_', |
@@ -931,8 +931,8 @@ discard block |
||
931 | 931 | */ |
932 | 932 | public function testCreateTwoMocksOfOneWsdlFile() |
933 | 933 | { |
934 | - $a = $this->getMockFromWsdl(__DIR__ . '/_fixture/GoogleSearch.wsdl'); |
|
935 | - $b = $this->getMockFromWsdl(__DIR__ . '/_fixture/GoogleSearch.wsdl'); |
|
934 | + $a = $this->getMockFromWsdl(__DIR__.'/_fixture/GoogleSearch.wsdl'); |
|
935 | + $b = $this->getMockFromWsdl(__DIR__.'/_fixture/GoogleSearch.wsdl'); |
|
936 | 936 | |
937 | 937 | $this->assertStringStartsWith('Mock_GoogleSearch_', get_class($a)); |
938 | 938 | $this->assertEquals(get_class($a), get_class($b)); |
@@ -1014,8 +1014,8 @@ discard block |
||
1014 | 1014 | ['\Traversable'], |
1015 | 1015 | ['TraversableMockTestInterface'], |
1016 | 1016 | [['Traversable']], |
1017 | - [['Iterator','Traversable']], |
|
1018 | - [['\Iterator','\Traversable']] |
|
1017 | + [['Iterator', 'Traversable']], |
|
1018 | + [['\Iterator', '\Traversable']] |
|
1019 | 1019 | ]; |
1020 | 1020 | } |
1021 | 1021 | |
@@ -1026,12 +1026,12 @@ discard block |
||
1026 | 1026 | $callCount = 0; |
1027 | 1027 | |
1028 | 1028 | $mock->expects($this->exactly($expectedNumberOfCalls))->method('bar') |
1029 | - ->with($this->callback(function ($argument) use (&$callCount) { |
|
1030 | - return $argument === 'call_' . $callCount++; |
|
1029 | + ->with($this->callback(function($argument) use (&$callCount) { |
|
1030 | + return $argument === 'call_'.$callCount++; |
|
1031 | 1031 | })); |
1032 | 1032 | |
1033 | 1033 | for ($i = 0; $i < $expectedNumberOfCalls; $i++) { |
1034 | - $mock->bar('call_' . $i); |
|
1034 | + $mock->bar('call_'.$i); |
|
1035 | 1035 | } |
1036 | 1036 | } |
1037 | 1037 | } |
@@ -1,3 +1,3 @@ |
||
1 | 1 | <?php |
2 | -require __DIR__ . '/_fixture/FunctionCallback.php'; |
|
3 | -require __DIR__ . '/../vendor/autoload.php'; |
|
2 | +require __DIR__.'/_fixture/FunctionCallback.php'; |
|
3 | +require __DIR__.'/../vendor/autoload.php'; |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | |
192 | 192 | public function testCanConfigureMethodsForDoubleOfNonExistentClass() |
193 | 193 | { |
194 | - $className = 'X' . md5(microtime()); |
|
194 | + $className = 'X'.md5(microtime()); |
|
195 | 195 | |
196 | 196 | $mock = $this->generator->getMock($className, ['someMethod']); |
197 | 197 | |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | |
201 | 201 | public function testCanInvokeMethodsOfNonExistentClass() |
202 | 202 | { |
203 | - $className = 'X' . md5(microtime()); |
|
203 | + $className = 'X'.md5(microtime()); |
|
204 | 204 | |
205 | 205 | $mock = $this->generator->getMock($className, ['someMethod']); |
206 | 206 |
@@ -135,12 +135,12 @@ |
||
135 | 135 | |
136 | 136 | case 'callable': |
137 | 137 | case 'Closure': |
138 | - return function () { |
|
138 | + return function() { |
|
139 | 139 | }; |
140 | 140 | |
141 | 141 | case 'Traversable': |
142 | 142 | case 'Generator': |
143 | - $generator = function () { |
|
143 | + $generator = function() { |
|
144 | 144 | yield; |
145 | 145 | }; |
146 | 146 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | { |
18 | 18 | if (!$invocation instanceof PHPUnit_Framework_MockObject_Invocation_Object) { |
19 | 19 | throw new PHPUnit_Framework_MockObject_RuntimeException( |
20 | - 'The current object can only be returned when mocking an ' . |
|
20 | + 'The current object can only be returned when mocking an '. |
|
21 | 21 | 'object, not a static class.' |
22 | 22 | ); |
23 | 23 | } |
@@ -34,14 +34,14 @@ |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | return sprintf( |
37 | - 'return result of user defined callback %s%s%s() with the ' . |
|
37 | + 'return result of user defined callback %s%s%s() with the '. |
|
38 | 38 | 'passed arguments', |
39 | 39 | $class, |
40 | 40 | $type, |
41 | 41 | $this->callback[1] |
42 | 42 | ); |
43 | 43 | } else { |
44 | - return 'return result of user defined callback ' . $this->callback . |
|
44 | + return 'return result of user defined callback '.$this->callback. |
|
45 | 45 | ' with the passed arguments'; |
46 | 46 | } |
47 | 47 | } |