@@ -8,8 +8,7 @@ |
||
| 8 | 8 | * |
| 9 | 9 | * @author Jakub Konečný |
| 10 | 10 | */ |
| 11 | -interface FileLoader extends Loader |
|
| 12 | -{ |
|
| 11 | +interface FileLoader extends Loader { |
|
| 13 | 12 | /** |
| 14 | 13 | * @return string[] |
| 15 | 14 | */ |
@@ -3,10 +3,10 @@ |
||
| 3 | 3 | |
| 4 | 4 | namespace Nexendrie\Translation; |
| 5 | 5 | |
| 6 | -if (false) { // @phpstan-ignore if.alwaysFalse |
|
| 6 | +if (false) { |
|
| 7 | +// @phpstan-ignore if.alwaysFalse |
|
| 7 | 8 | /** @deprecated Use Loader */ |
| 8 | - interface ILoader extends Loader |
|
| 9 | - { |
|
| 9 | + interface ILoader extends Loader { |
|
| 10 | 10 | } |
| 11 | 11 | } elseif (!interface_exists(ILoader::class)) { |
| 12 | 12 | class_alias(Loader::class, ILoader::class); |
@@ -8,8 +8,7 @@ |
||
| 8 | 8 | * |
| 9 | 9 | * @author Jakub Konečný |
| 10 | 10 | */ |
| 11 | -interface IMessageSelector |
|
| 12 | -{ |
|
| 11 | +interface IMessageSelector { |
|
| 13 | 12 | /** |
| 14 | 13 | * Does the message contain multiple variants? |
| 15 | 14 | */ |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | * |
| 9 | 9 | * @author Jakub Konečný |
| 10 | 10 | */ |
| 11 | -interface SettableLocaleResolver extends LocaleResolver |
|
| 12 | -{ |
|
| 11 | +interface SettableLocaleResolver extends LocaleResolver { |
|
| 13 | 12 | public function setLang(string $lang): void; |
| 14 | 13 | } |
@@ -3,6 +3,5 @@ |
||
| 3 | 3 | |
| 4 | 4 | namespace Nexendrie\Translation; |
| 5 | 5 | |
| 6 | -class LoaderNotSetException extends InvalidStateException |
|
| 7 | -{ |
|
| 6 | +class LoaderNotSetException extends InvalidStateException { |
|
| 8 | 7 | } |
@@ -8,8 +8,7 @@ |
||
| 8 | 8 | * |
| 9 | 9 | * @author Jakub Konečný |
| 10 | 10 | */ |
| 11 | -interface LocaleResolver |
|
| 12 | -{ |
|
| 11 | +interface LocaleResolver { |
|
| 13 | 12 | /** |
| 14 | 13 | * Resolve language |
| 15 | 14 | */ |
@@ -11,10 +11,8 @@ |
||
| 11 | 11 | * @author Jakub Konečný |
| 12 | 12 | * @testCase |
| 13 | 13 | */ |
| 14 | -final class JsonLoaderTest extends FileLoaderTestAbstract |
|
| 15 | -{ |
|
| 16 | - protected function setUp() |
|
| 17 | - { |
|
| 14 | +final class JsonLoaderTest extends FileLoaderTestAbstract { |
|
| 15 | + protected function setUp() { |
|
| 18 | 16 | $folders = [__DIR__ . "/../../../lang", __DIR__ . "/../../../lang2"]; |
| 19 | 17 | $this->loader = new JsonLoader(new ManualLocaleResolver(), $folders); |
| 20 | 18 | } |
@@ -9,8 +9,7 @@ |
||
| 9 | 9 | * @author Jakub Konečný |
| 10 | 10 | * @testCase |
| 11 | 11 | */ |
| 12 | -final class Loader extends FileLoader |
|
| 13 | -{ |
|
| 12 | +final class Loader extends FileLoader { |
|
| 14 | 13 | protected string $extension = "php"; |
| 15 | 14 | |
| 16 | 15 | protected function parseFile(string $filename): array |
@@ -11,10 +11,8 @@ |
||
| 11 | 11 | * @author Jakub Konečný |
| 12 | 12 | * @testCase |
| 13 | 13 | */ |
| 14 | -final class YamlLoaderTest extends FileLoaderTestAbstract |
|
| 15 | -{ |
|
| 16 | - protected function setUp() |
|
| 17 | - { |
|
| 14 | +final class YamlLoaderTest extends FileLoaderTestAbstract { |
|
| 15 | + protected function setUp() { |
|
| 18 | 16 | $folders = [__DIR__ . "/../../../lang", __DIR__ . "/../../../lang2"]; |
| 19 | 17 | $this->loader = new YamlLoader(new ManualLocaleResolver(), $folders); |
| 20 | 18 | } |