@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | public function testHasLocale(): void |
| 26 | 26 | { |
| 27 | 27 | $loader = new CatalogueLoader(new TranslatorConfig([ |
| 28 | - 'directory' => __DIR__ . '/fixtures/locales/', |
|
| 28 | + 'directory' => __DIR__.'/fixtures/locales/', |
|
| 29 | 29 | ])); |
| 30 | 30 | |
| 31 | 31 | $this->assertTrue($loader->hasLocale('ru')); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | public function testGetLocales(): void |
| 36 | 36 | { |
| 37 | 37 | $loader = new CatalogueLoader(new TranslatorConfig([ |
| 38 | - 'directory' => __DIR__ . '/fixtures/locales/', |
|
| 38 | + 'directory' => __DIR__.'/fixtures/locales/', |
|
| 39 | 39 | ])); |
| 40 | 40 | |
| 41 | 41 | $compared = $loader->getLocales(); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | public function testLoadCatalogue(): void |
| 50 | 50 | { |
| 51 | 51 | $loader = 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, |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | public function testLoadCatalogueNoLoader(): void |
| 90 | 90 | { |
| 91 | 91 | $loader = new CatalogueLoader(new TranslatorConfig([ |
| 92 | - 'directory' => __DIR__ . '/fixtures/locales/', |
|
| 92 | + 'directory' => __DIR__.'/fixtures/locales/', |
|
| 93 | 93 | 'loaders' => [ |
| 94 | 94 | 'php' => PhpFileLoader::class, |
| 95 | 95 | ], |
@@ -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 | } |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | $this->expectException(LoaderException::class); |
| 25 | 25 | |
| 26 | 26 | $loader = new ViewLoader([ |
| 27 | - 'default' => __DIR__ . '/fixtures/default', |
|
| 27 | + 'default' => __DIR__.'/fixtures/default', |
|
| 28 | 28 | ]); |
| 29 | 29 | |
| 30 | 30 | $loader->exists('view'); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | $this->expectException(LoaderException::class); |
| 36 | 36 | |
| 37 | 37 | $loader = new ViewLoader([ |
| 38 | - 'default' => __DIR__ . '/fixtures/default', |
|
| 38 | + 'default' => __DIR__.'/fixtures/default', |
|
| 39 | 39 | ]); |
| 40 | 40 | |
| 41 | 41 | $loader->list(); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $this->expectException(LoaderException::class); |
| 47 | 47 | |
| 48 | 48 | $loader = new ViewLoader([ |
| 49 | - 'default' => __DIR__ . '/fixtures/default', |
|
| 49 | + 'default' => __DIR__.'/fixtures/default', |
|
| 50 | 50 | ]); |
| 51 | 51 | |
| 52 | 52 | $loader->load('view'); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | public function testExists(): void |
| 56 | 56 | { |
| 57 | 57 | $loader = new ViewLoader([ |
| 58 | - 'default' => __DIR__ . '/fixtures/default', |
|
| 58 | + 'default' => __DIR__.'/fixtures/default', |
|
| 59 | 59 | ]); |
| 60 | 60 | |
| 61 | 61 | $loader = $loader->withExtension('php'); |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | public function testList(): void |
| 87 | 87 | { |
| 88 | 88 | $loader = new ViewLoader([ |
| 89 | - 'default' => __DIR__ . '/fixtures/default', |
|
| 89 | + 'default' => __DIR__.'/fixtures/default', |
|
| 90 | 90 | ]); |
| 91 | 91 | |
| 92 | 92 | $loader = $loader->withExtension('php'); |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | $this->expectException(LoaderException::class); |
| 104 | 104 | |
| 105 | 105 | $loader = new ViewLoader([ |
| 106 | - 'default' => __DIR__ . '/fixtures/default', |
|
| 106 | + 'default' => __DIR__.'/fixtures/default', |
|
| 107 | 107 | ]); |
| 108 | 108 | |
| 109 | 109 | $loader = $loader->withExtension('php'); |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | public function testLoad(): void |
| 147 | 147 | { |
| 148 | 148 | $loader = new ViewLoader([ |
| 149 | - 'default' => __DIR__ . '/fixtures/default', |
|
| 149 | + 'default' => __DIR__.'/fixtures/default', |
|
| 150 | 150 | ]); |
| 151 | 151 | |
| 152 | 152 | $loader = $loader->withExtension('php'); |
@@ -169,8 +169,8 @@ discard block |
||
| 169 | 169 | public function testMultipleNamespaces(): void |
| 170 | 170 | { |
| 171 | 171 | $loader = new ViewLoader([ |
| 172 | - 'default' => __DIR__ . '/fixtures/default', |
|
| 173 | - 'other' => __DIR__ . '/fixtures/other', |
|
| 172 | + 'default' => __DIR__.'/fixtures/default', |
|
| 173 | + 'other' => __DIR__.'/fixtures/other', |
|
| 174 | 174 | |
| 175 | 175 | ]); |
| 176 | 176 | |
@@ -36,7 +36,8 @@ |
||
| 36 | 36 | $manager->addEngine(new NativeEngine($this->container, 'dark.php')); |
| 37 | 37 | |
| 38 | 38 | $ext = []; |
| 39 | - foreach ($manager->getEngines() as $e) { |
|
| 39 | + foreach ($manager->getEngines() as $e) |
|
| 40 | + { |
|
| 40 | 41 | $ext[] = $e->getLoader()->getExtension(); |
| 41 | 42 | } |
| 42 | 43 | |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | $manager->addEngine(new NativeEngine($this->container, 'dark.php')); |
| 34 | 34 | |
| 35 | 35 | $ext = []; |
| 36 | - foreach ($manager->getEngines() as $e) { |
|
| 36 | + foreach ($manager->getEngines() as $e){ |
|
| 37 | 37 | $ext[] = $e->getLoader()->getExtension(); |
| 38 | 38 | } |
| 39 | 39 | |
@@ -24,8 +24,8 @@ discard block |
||
| 24 | 24 | public function testGet(): void |
| 25 | 25 | { |
| 26 | 26 | $loader = new ViewLoader([ |
| 27 | - 'default' => __DIR__ . '/fixtures/default', |
|
| 28 | - 'other' => __DIR__ . '/fixtures/other', |
|
| 27 | + 'default' => __DIR__.'/fixtures/default', |
|
| 28 | + 'other' => __DIR__.'/fixtures/other', |
|
| 29 | 29 | ]); |
| 30 | 30 | |
| 31 | 31 | $loader = $loader->withExtension('php'); |
@@ -51,8 +51,8 @@ discard block |
||
| 51 | 51 | public function testRenderWithValue(): void |
| 52 | 52 | { |
| 53 | 53 | $loader = new ViewLoader([ |
| 54 | - 'default' => __DIR__ . '/fixtures/default', |
|
| 55 | - 'other' => __DIR__ . '/fixtures/other', |
|
| 54 | + 'default' => __DIR__.'/fixtures/default', |
|
| 55 | + 'other' => __DIR__.'/fixtures/other', |
|
| 56 | 56 | |
| 57 | 57 | ]); |
| 58 | 58 | |
@@ -70,8 +70,8 @@ discard block |
||
| 70 | 70 | $this->expectException(RenderException::class); |
| 71 | 71 | |
| 72 | 72 | $loader = new ViewLoader([ |
| 73 | - 'default' => __DIR__ . '/fixtures/default', |
|
| 74 | - 'other' => __DIR__ . '/fixtures/other', |
|
| 73 | + 'default' => __DIR__.'/fixtures/default', |
|
| 74 | + 'other' => __DIR__.'/fixtures/other', |
|
| 75 | 75 | |
| 76 | 76 | ]); |
| 77 | 77 | |
@@ -88,8 +88,8 @@ discard block |
||
| 88 | 88 | public function testRenderBufferWithValue(): void |
| 89 | 89 | { |
| 90 | 90 | $loader = new ViewLoader([ |
| 91 | - 'default' => __DIR__ . '/fixtures/default', |
|
| 92 | - 'other' => __DIR__ . '/fixtures/other', |
|
| 91 | + 'default' => __DIR__.'/fixtures/default', |
|
| 92 | + 'other' => __DIR__.'/fixtures/other', |
|
| 93 | 93 | |
| 94 | 94 | ]); |
| 95 | 95 | |
@@ -107,8 +107,8 @@ discard block |
||
| 107 | 107 | $this->expectException(RenderException::class); |
| 108 | 108 | |
| 109 | 109 | $loader = new ViewLoader([ |
| 110 | - 'default' => __DIR__ . '/fixtures/default', |
|
| 111 | - 'other' => __DIR__ . '/fixtures/other', |
|
| 110 | + 'default' => __DIR__.'/fixtures/default', |
|
| 111 | + 'other' => __DIR__.'/fixtures/other', |
|
| 112 | 112 | |
| 113 | 113 | ]); |
| 114 | 114 | |