Passed
Push — master ( 484e36...59734e )
by Jakub
01:04
created
tests/Nexendrie/Translation/CustomMessageSelector.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@
 block discarded – undo
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));
Please login to merge, or discard this patch.
tests/Nexendrie/Translation/Resolvers/HeaderLocaleResolverTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
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 */
Please login to merge, or discard this patch.