@@ -18,7 +18,7 @@ |
||
18 | 18 | { |
19 | 19 | public function load(string $id): ?TokenInterface |
20 | 20 | { |
21 | - if ($id === 'bad') { |
|
21 | + if ($id === 'bad'){ |
|
22 | 22 | return null; |
23 | 23 | } |
24 | 24 |
@@ -18,7 +18,8 @@ |
||
18 | 18 | { |
19 | 19 | public function load(string $id): ?TokenInterface |
20 | 20 | { |
21 | - if ($id === 'bad') { |
|
21 | + if ($id === 'bad') |
|
22 | + { |
|
22 | 23 | return null; |
23 | 24 | } |
24 | 25 |
@@ -27,12 +27,15 @@ |
||
27 | 27 | $functionA = null; |
28 | 28 | $functionB = null; |
29 | 29 | |
30 | - foreach ($reflection->getInvocations() as $invocation) { |
|
31 | - if ($invocation->getName() == 'test_function_a') { |
|
30 | + foreach ($reflection->getInvocations() as $invocation) |
|
31 | + { |
|
32 | + if ($invocation->getName() == 'test_function_a') |
|
33 | + { |
|
32 | 34 | $functionA = $invocation; |
33 | 35 | } |
34 | 36 | |
35 | - if ($invocation->getName() == 'test_function_b') { |
|
37 | + if ($invocation->getName() == 'test_function_b') |
|
38 | + { |
|
36 | 39 | $functionB = $invocation; |
37 | 40 | } |
38 | 41 | } |
@@ -16,17 +16,17 @@ discard block |
||
16 | 16 | $this->assertContains(TestTrait::class, $reflection->getTraits()); |
17 | 17 | $this->assertContains(TestInterface::class, $reflection->getInterfaces()); |
18 | 18 | |
19 | - $this->assertSame([__NAMESPACE__ . '\hello'], $reflection->getFunctions()); |
|
19 | + $this->assertSame([__NAMESPACE__.'\hello'], $reflection->getFunctions()); |
|
20 | 20 | |
21 | 21 | $functionA = null; |
22 | 22 | $functionB = null; |
23 | 23 | |
24 | - foreach ($reflection->getInvocations() as $invocation) { |
|
25 | - if ($invocation->getName() == 'test_function_a') { |
|
24 | + foreach ($reflection->getInvocations() as $invocation){ |
|
25 | + if ($invocation->getName() == 'test_function_a'){ |
|
26 | 26 | $functionA = $invocation; |
27 | 27 | } |
28 | 28 | |
29 | - if ($invocation->getName() == 'test_function_b') { |
|
29 | + if ($invocation->getName() == 'test_function_b'){ |
|
30 | 30 | $functionB = $invocation; |
31 | 31 | } |
32 | 32 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | public function testReflectionFileWithNamedParameters(): void |
55 | 55 | { |
56 | - $reflection = new ReflectionFile(__DIR__ . '/Classes/ClassWithNamedParameter.php'); |
|
56 | + $reflection = new ReflectionFile(__DIR__.'/Classes/ClassWithNamedParameter.php'); |
|
57 | 57 | |
58 | 58 | $this->assertSame([ |
59 | 59 | 'Spiral\Tests\Tokenizer\Classes\ClassWithNamedParameter', |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | public function testReflectionFileAnonymousClass(): void |
64 | 64 | { |
65 | - $reflection = new ReflectionFile(__DIR__ . '/Classes/ClassWithAnonymousClass.php'); |
|
65 | + $reflection = new ReflectionFile(__DIR__.'/Classes/ClassWithAnonymousClass.php'); |
|
66 | 66 | |
67 | 67 | $this->assertSame([ |
68 | 68 | 'Spiral\Tests\Tokenizer\Classes\ClassWithAnonymousClass', |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | public function testReflectionFileWithHeredoc(): void |
73 | 73 | { |
74 | - $reflection = new ReflectionFile(__DIR__ . '/Classes/ClassWithHeredoc.php'); |
|
74 | + $reflection = new ReflectionFile(__DIR__.'/Classes/ClassWithHeredoc.php'); |
|
75 | 75 | |
76 | 76 | $this->assertSame([ |
77 | 77 | 'Spiral\Tests\Tokenizer\Classes\ClassWithHeredoc', |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | |
81 | 81 | public function testReflectionEnum(): void |
82 | 82 | { |
83 | - $reflection = new ReflectionFile(__DIR__ . '/Classes/ClassD.php'); |
|
83 | + $reflection = new ReflectionFile(__DIR__.'/Classes/ClassD.php'); |
|
84 | 84 | |
85 | 85 | $this->assertSame([ |
86 | 86 | 'Spiral\Tests\Tokenizer\Classes\ClassD', |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | public function testReflectionTypedEnum(): void |
91 | 91 | { |
92 | - $reflection = new ReflectionFile(__DIR__ . '/Classes/ClassE.php'); |
|
92 | + $reflection = new ReflectionFile(__DIR__.'/Classes/ClassE.php'); |
|
93 | 93 | |
94 | 94 | $this->assertSame([ |
95 | 95 | 'Spiral\Tests\Tokenizer\Classes\ClassE', |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | public function testReflectionInterface(): void |
100 | 100 | { |
101 | - $reflection = new ReflectionFile(__DIR__ . '/Interfaces/InterfaceA.php'); |
|
101 | + $reflection = new ReflectionFile(__DIR__.'/Interfaces/InterfaceA.php'); |
|
102 | 102 | |
103 | 103 | $this->assertSame([ |
104 | 104 | 'Spiral\Tests\Tokenizer\Interfaces\InterfaceA', |
@@ -77,7 +77,7 @@ |
||
77 | 77 | $container = new Container(); |
78 | 78 | $container->bind(TranslatorConfig::class, new TranslatorConfig([ |
79 | 79 | 'locale' => 'en', |
80 | - 'directory' => __DIR__ . '/fixtures/locales/', |
|
80 | + 'directory' => __DIR__.'/fixtures/locales/', |
|
81 | 81 | 'loaders' => [ |
82 | 82 | 'php' => PhpFileLoader::class, |
83 | 83 | 'po' => PoFileLoader::class, |
@@ -44,7 +44,7 @@ |
||
44 | 44 | |
45 | 45 | $this->container->bind(TranslatorConfig::class, new TranslatorConfig([ |
46 | 46 | 'locale' => 'en', |
47 | - 'directory' => __DIR__ . '/fixtures/locales/', |
|
47 | + 'directory' => __DIR__.'/fixtures/locales/', |
|
48 | 48 | 'loaders' => [ |
49 | 49 | 'php' => PhpFileLoader::class, |
50 | 50 | 'po' => PoFileLoader::class, |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $cache->shouldReceive('setLocales')->andReturn(null); |
32 | 32 | |
33 | 33 | $manager = new CatalogueManager(new CatalogueLoader(new TranslatorConfig([ |
34 | - 'directory' => __DIR__ . '/fixtures/locales/', |
|
34 | + 'directory' => __DIR__.'/fixtures/locales/', |
|
35 | 35 | 'loaders' => [ |
36 | 36 | 'php' => PhpFileLoader::class, |
37 | 37 | 'po' => PoFileLoader::class, |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $cache->shouldNotReceive('setLocales')->andReturn(null); |
50 | 50 | |
51 | 51 | $manager = new CatalogueManager(new CatalogueLoader(new TranslatorConfig([ |
52 | - 'directory' => __DIR__ . '/fixtures/locales/', |
|
52 | + 'directory' => __DIR__.'/fixtures/locales/', |
|
53 | 53 | 'loaders' => [ |
54 | 54 | 'php' => PhpFileLoader::class, |
55 | 55 | 'po' => PoFileLoader::class, |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $cache->shouldReceive('getLocales')->andReturn(['en', 'ru']); |
67 | 67 | |
68 | 68 | $manager = new CatalogueManager(new CatalogueLoader(new TranslatorConfig([ |
69 | - 'directory' => __DIR__ . '/fixtures/locales/', |
|
69 | + 'directory' => __DIR__.'/fixtures/locales/', |
|
70 | 70 | 'loaders' => [ |
71 | 71 | 'php' => PhpFileLoader::class, |
72 | 72 | 'po' => PoFileLoader::class, |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | ]); |
130 | 130 | |
131 | 131 | $manager = new CatalogueManager(new CatalogueLoader(new TranslatorConfig([ |
132 | - 'directory' => __DIR__ . '/fixtures/locales/', |
|
132 | + 'directory' => __DIR__.'/fixtures/locales/', |
|
133 | 133 | 'loaders' => [ |
134 | 134 | 'php' => PhpFileLoader::class, |
135 | 135 | 'po' => PoFileLoader::class, |
@@ -26,7 +26,7 @@ |
||
26 | 26 | string $clientFilename = null, |
27 | 27 | string $clientMediaType = null |
28 | 28 | ): UploadedFileInterface { |
29 | - if ($size === null) { |
|
29 | + if ($size === null){ |
|
30 | 30 | $size = $stream->getSize(); |
31 | 31 | } |
32 | 32 |
@@ -26,7 +26,8 @@ |
||
26 | 26 | string $clientFilename = null, |
27 | 27 | string $clientMediaType = null |
28 | 28 | ): UploadedFileInterface { |
29 | - if ($size === null) { |
|
29 | + if ($size === null) |
|
30 | + { |
|
30 | 31 | $size = $stream->getSize(); |
31 | 32 | } |
32 | 33 |
@@ -27,7 +27,7 @@ |
||
27 | 27 | $router = $this->makeRouter(); |
28 | 28 | $router->setRoute( |
29 | 29 | 'action', |
30 | - new Route('/something', function () { |
|
30 | + new Route('/something', function (){ |
|
31 | 31 | return 'hello world'; |
32 | 32 | }) |
33 | 33 | ); |
@@ -27,7 +27,8 @@ |
||
27 | 27 | $router = $this->makeRouter(); |
28 | 28 | $router->setRoute( |
29 | 29 | 'action', |
30 | - new Route('/something', function () { |
|
30 | + new Route('/something', function () |
|
31 | + { |
|
31 | 32 | return 'hello world'; |
32 | 33 | }) |
33 | 34 | ); |
@@ -24,7 +24,7 @@ |
||
24 | 24 | { |
25 | 25 | public function tearDown(): void |
26 | 26 | { |
27 | - if ((int)session_status() === PHP_SESSION_ACTIVE) { |
|
27 | + if ((int)session_status() === PHP_SESSION_ACTIVE){ |
|
28 | 28 | session_abort(); |
29 | 29 | } |
30 | 30 | } |
@@ -24,7 +24,8 @@ |
||
24 | 24 | { |
25 | 25 | public function tearDown(): void |
26 | 26 | { |
27 | - if ((int)session_status() === PHP_SESSION_ACTIVE) { |
|
27 | + if ((int)session_status() === PHP_SESSION_ACTIVE) |
|
28 | + { |
|
28 | 29 | session_abort(); |
29 | 30 | } |
30 | 31 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | public function tearDown(): void |
53 | 53 | { |
54 | - if ((int)session_status() === PHP_SESSION_ACTIVE) { |
|
54 | + if ((int)session_status() === PHP_SESSION_ACTIVE){ |
|
55 | 55 | session_abort(); |
56 | 56 | } |
57 | 57 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $this->assertSame('default', $section->getName()); |
126 | 126 | |
127 | 127 | $section->set('key', 'value'); |
128 | - foreach ($section as $key => $value) { |
|
128 | + foreach ($section as $key => $value){ |
|
129 | 129 | $this->assertSame('key', $key); |
130 | 130 | $this->assertSame('value', $value); |
131 | 131 | } |
@@ -51,7 +51,8 @@ discard block |
||
51 | 51 | |
52 | 52 | public function tearDown(): void |
53 | 53 | { |
54 | - if ((int)session_status() === PHP_SESSION_ACTIVE) { |
|
54 | + if ((int)session_status() === PHP_SESSION_ACTIVE) |
|
55 | + { |
|
55 | 56 | session_abort(); |
56 | 57 | } |
57 | 58 | } |
@@ -125,7 +126,8 @@ discard block |
||
125 | 126 | $this->assertSame('default', $section->getName()); |
126 | 127 | |
127 | 128 | $section->set('key', 'value'); |
128 | - foreach ($section as $key => $value) { |
|
129 | + foreach ($section as $key => $value) |
|
130 | + { |
|
129 | 131 | $this->assertSame('key', $key); |
130 | 132 | $this->assertSame('value', $value); |
131 | 133 | } |