@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | namespace TheSeer\Tokenizer; |
3 | 3 | |
4 | 4 | class Tokenizer { |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | namespace TheSeer\Tokenizer; |
3 | 3 | |
4 | 4 | class NamespaceUriException extends Exception { |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | namespace TheSeer\Tokenizer; |
3 | 3 | |
4 | 4 | use DOMDocument; |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $this->writer->endElement(); |
84 | 84 | |
85 | 85 | $this->writer->startElement('line'); |
86 | - $this->writer->writeAttribute('no', (string)$token->getLine()); |
|
86 | + $this->writer->writeAttribute('no', (string) $token->getLine()); |
|
87 | 87 | $this->previousToken = $token; |
88 | 88 | } |
89 | 89 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | namespace TheSeer\Tokenizer; |
3 | 3 | |
4 | 4 | class TokenCollectionException extends Exception { |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | namespace TheSeer\Tokenizer; |
3 | 3 | |
4 | 4 | class NamespaceUri { |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | namespace TheSeer\Tokenizer; |
3 | 3 | |
4 | 4 | class Exception extends \Exception { |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | namespace foo; |
3 | 3 | |
4 | 4 | class bar { |
@@ -20,6 +20,6 @@ discard block |
||
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 | } |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | namespace TheSeer\Tokenizer; |
3 | 3 | |
4 | 4 | use PHPUnit\Framework\TestCase; |
@@ -32,7 +32,7 @@ discard block |
||
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 | } |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | namespace TheSeer\Tokenizer; |
3 | 3 | |
4 | 4 | use PHPUnit\Framework\TestCase; |
@@ -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,14 +34,14 @@ 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)); |
41 | 41 | } |
42 | 42 | |
43 | 43 | public function testEmptyCollectionCreatesEmptyDocument() { |
44 | - $expected = file_get_contents(__DIR__ . '/_files/empty.xml'); |
|
44 | + $expected = file_get_contents(__DIR__.'/_files/empty.xml'); |
|
45 | 45 | |
46 | 46 | $serializer = new XMLSerializer(); |
47 | 47 | $this->assertEquals($expected, $serializer->toXML((new TokenCollection()))); |