@@ -20,13 +20,13 @@ |
||
| 20 | 20 | |
| 21 | 21 | public function choose(string $message, int $count): string |
| 22 | 22 | { |
| 23 | - if (!$this->isMultiChoice($message)) { |
|
| 23 | + if(!$this->isMultiChoice($message)) { |
|
| 24 | 24 | return $message; |
| 25 | 25 | } |
| 26 | 26 | $variants = explode("|", $message); |
| 27 | - foreach ($variants as $variant) { |
|
| 27 | + foreach($variants as $variant) { |
|
| 28 | 28 | $interval = Intervals::findInterval($variant); |
| 29 | - if (is_string($interval) && Intervals::isInInterval($count, $interval)) { |
|
| 29 | + if(is_string($interval) && Intervals::isInInterval($count, $interval)) { |
|
| 30 | 30 | return Strings::trim((string) Strings::after($variant, $interval)); |
| 31 | 31 | } |
| 32 | 32 | } |
@@ -11,8 +11,7 @@ |
||
| 11 | 11 | * |
| 12 | 12 | * @author Jakub Konečný |
| 13 | 13 | */ |
| 14 | -final class CustomMessageSelector implements IMessageSelector |
|
| 15 | -{ |
|
| 14 | +final class CustomMessageSelector implements IMessageSelector { |
|
| 16 | 15 | public function isMultiChoice(string $message): bool |
| 17 | 16 | { |
| 18 | 17 | return is_string(Intervals::findInterval($message)); |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | public function testResolve(): void |
| 31 | 31 | { |
| 32 | 32 | $resolver = new HeaderLocaleResolver(); |
| 33 | - Assert::exception(function () use ($resolver) { |
|
| 33 | + Assert::exception(function() use ($resolver) { |
|
| 34 | 34 | $resolver->resolve(); |
| 35 | 35 | }, LoaderNotSetException::class); |
| 36 | 36 | /** @var Loader $loader */ |