@@ -60,7 +60,7 @@ |
||
60 | 60 | $interfaces = $reflectionClass->getInterfaces(); |
61 | 61 | $tagList = array(); |
62 | 62 | |
63 | - foreach($interfaces as $interface) { |
|
63 | + foreach ($interfaces as $interface) { |
|
64 | 64 | $tagList = array_merge($tagList, $this->classRetriever->getTagList($interface)); |
65 | 65 | } |
66 | 66 |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | } |
95 | 95 | |
96 | 96 | // Sort matches by their score value |
97 | - @usort($matches, function ($match1, $match2) { return $match2[0] - $match1[0]; }); |
|
97 | + @usort($matches, function($match1, $match2) { return $match2[0] - $match1[0]; }); |
|
98 | 98 | |
99 | 99 | // If Highest rated method prophecy has a promise - execute it or return null instead |
100 | 100 | $methodProphecy = $matches[0][1]; |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | public function findCalls($methodName, ArgumentsWildcard $wildcard) |
138 | 138 | { |
139 | 139 | return array_values( |
140 | - array_filter($this->recordedCalls, function (Call $call) use ($methodName, $wildcard) { |
|
140 | + array_filter($this->recordedCalls, function(Call $call) use ($methodName, $wildcard) { |
|
141 | 141 | return $methodName === $call->getMethodName() |
142 | 142 | && 0 < $wildcard->scoreArguments($call->getArguments()) |
143 | 143 | ; |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | { |
151 | 151 | $classname = get_class($prophecy->reveal()); |
152 | 152 | $argstring = implode(', ', array_map(array($this->util, 'stringify'), $arguments)); |
153 | - $expected = implode("\n", array_map(function (MethodProphecy $methodProphecy) { |
|
153 | + $expected = implode("\n", array_map(function(MethodProphecy $methodProphecy) { |
|
154 | 154 | return sprintf(' - %s(%s)', |
155 | 155 | $methodProphecy->getMethodName(), |
156 | 156 | $methodProphecy->getArgumentsWildcard() |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | return; |
79 | 79 | } |
80 | 80 | |
81 | - $this->will(function () use ($type) { |
|
81 | + $this->will(function() use ($type) { |
|
82 | 82 | switch ($type) { |
83 | 83 | case 'string': return ''; |
84 | 84 | case 'float': return 0.0; |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | case 'callable': |
90 | 90 | case 'Closure': |
91 | - return function () {}; |
|
91 | + return function() {}; |
|
92 | 92 | |
93 | 93 | case 'Traversable': |
94 | 94 | case 'Generator': |
@@ -13,13 +13,13 @@ discard block |
||
13 | 13 | |
14 | 14 | protected function setUp() { |
15 | 15 | $this->tokens = unserialize( |
16 | - file_get_contents(__DIR__ . '/_files/test.php.tokens'), |
|
16 | + file_get_contents(__DIR__.'/_files/test.php.tokens'), |
|
17 | 17 | [TokenCollection::class] |
18 | 18 | ); |
19 | 19 | } |
20 | 20 | |
21 | 21 | public function testCanBeSerializedToXml() { |
22 | - $expected = file_get_contents(__DIR__ . '/_files/test.php.xml'); |
|
22 | + $expected = file_get_contents(__DIR__.'/_files/test.php.xml'); |
|
23 | 23 | |
24 | 24 | $serializer = new XMLSerializer(); |
25 | 25 | $this->assertEquals($expected, $serializer->toXML($this->tokens)); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | public function testCanBeSerializedToXmlWithCustomNamespace() { |
37 | - $expected = file_get_contents(__DIR__ . '/_files/customns.xml'); |
|
37 | + $expected = file_get_contents(__DIR__.'/_files/customns.xml'); |
|
38 | 38 | |
39 | 39 | $serializer = new XMLSerializer(new NamespaceUri('custom:xml:namespace')); |
40 | 40 | $this->assertEquals($expected, $serializer->toXML($this->tokens)); |
@@ -9,7 +9,7 @@ |
||
9 | 9 | private $token; |
10 | 10 | |
11 | 11 | protected function setUp() { |
12 | - $this->token = new Token(1,'test-dummy', 'blank'); |
|
12 | + $this->token = new Token(1, 'test-dummy', 'blank'); |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | public function testTokenCanBeCreated() { |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $this->collection->addToken($token); |
33 | 33 | $this->collection->addToken($token); |
34 | 34 | |
35 | - foreach($this->collection as $position => $current) { |
|
35 | + foreach ($this->collection as $position => $current) { |
|
36 | 36 | $this->assertInternalType('integer', $position); |
37 | 37 | $this->assertSame($token, $current); |
38 | 38 | } |
@@ -20,6 +20,6 @@ |
||
20 | 20 | } |
21 | 21 | |
22 | 22 | public function some(bar $b): string { |
23 | - return $b->getSomeX() . '-def'; |
|
23 | + return $b->getSomeX().'-def'; |
|
24 | 24 | } |
25 | 25 | } |
@@ -10,10 +10,10 @@ |
||
10 | 10 | |
11 | 11 | public function testValidSourceGetsParsed() { |
12 | 12 | $tokenizer = new Tokenizer(); |
13 | - $result = $tokenizer->parse(file_get_contents(__DIR__ . '/_files/test.php')); |
|
13 | + $result = $tokenizer->parse(file_get_contents(__DIR__.'/_files/test.php')); |
|
14 | 14 | |
15 | 15 | $expected = unserialize( |
16 | - file_get_contents(__DIR__ . '/_files/test.php.tokens'), |
|
16 | + file_get_contents(__DIR__.'/_files/test.php.tokens'), |
|
17 | 17 | [TokenCollection::class] |
18 | 18 | ); |
19 | 19 | $this->assertEquals($expected, $result); |
@@ -80,7 +80,7 @@ |
||
80 | 80 | $this->writer->endElement(); |
81 | 81 | |
82 | 82 | $this->writer->startElement('line'); |
83 | - $this->writer->writeAttribute('no', (string)$token->getLine()); |
|
83 | + $this->writer->writeAttribute('no', (string) $token->getLine()); |
|
84 | 84 | $this->previousToken = $token; |
85 | 85 | } |
86 | 86 |