@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare (strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Limoncello\l10n\Messages; |
| 4 | 4 | |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | { |
| 216 | 216 | $isValid = true; |
| 217 | 217 | foreach ($resources as $key => $valueAndLocale) { |
| 218 | - $isValid = $isValid === true && $this->checkPair((string)$key, $valueAndLocale); |
|
| 218 | + $isValid = $isValid === true && $this->checkPair((string) $key, $valueAndLocale); |
|
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | return $isValid; |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare (strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Limoncello\l10n\Messages; |
| 4 | 4 | |
@@ -61,8 +61,7 @@ discard block |
||
| 61 | 61 | foreach ($combinedNamespaces as $namespace) { |
| 62 | 62 | $bundle = $this->getBundle($locale, $namespace); |
| 63 | 63 | $bundle = $bundle !== null ? $bundle : $this->getBundle($defaultLocale, $namespace); |
| 64 | - $data[$locale][$namespace] = $defaultLocale === $locale ? $this->encodeBundle($bundle) : |
|
| 65 | - $this->encodeMergedBundles($bundle, $this->getBundle($defaultLocale, $namespace)); |
|
| 64 | + $data[$locale][$namespace] = $defaultLocale === $locale ? $this->encodeBundle($bundle) : $this->encodeMergedBundles($bundle, $this->getBundle($defaultLocale, $namespace)); |
|
| 66 | 65 | } |
| 67 | 66 | } |
| 68 | 67 | |
@@ -89,7 +88,7 @@ discard block |
||
| 89 | 88 | { |
| 90 | 89 | $encodedBundle = []; |
| 91 | 90 | foreach ($bundle->getKeys() as $key) { |
| 92 | - $encodedBundle[$key] = $this->getBundleValue($bundle, (string)$key); |
|
| 91 | + $encodedBundle[$key] = $this->getBundleValue($bundle, (string) $key); |
|
| 93 | 92 | } |
| 94 | 93 | |
| 95 | 94 | return $encodedBundle; |
@@ -137,13 +136,13 @@ discard block |
||
| 137 | 136 | $encodedBundle = []; |
| 138 | 137 | |
| 139 | 138 | foreach ($commonKeys as $key) { |
| 140 | - $encodedBundle[$key] = $this->getBundleValue($localizedBundle, (string)$key); |
|
| 139 | + $encodedBundle[$key] = $this->getBundleValue($localizedBundle, (string) $key); |
|
| 141 | 140 | } |
| 142 | 141 | foreach ($localizedOnlyKeys as $key) { |
| 143 | - $encodedBundle[$key] = $this->getBundleValue($localizedBundle, (string)$key); |
|
| 142 | + $encodedBundle[$key] = $this->getBundleValue($localizedBundle, (string) $key); |
|
| 144 | 143 | } |
| 145 | 144 | foreach ($defaultOnlyKeys as $key) { |
| 146 | - $encodedBundle[$key] = $this->getBundleValue($defaultBundle, (string)$key); |
|
| 145 | + $encodedBundle[$key] = $this->getBundleValue($defaultBundle, (string) $key); |
|
| 147 | 146 | } |
| 148 | 147 | |
| 149 | 148 | return $encodedBundle; |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare (strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Limoncello\l10n\Format; |
| 4 | 4 | |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | { |
| 94 | 94 | // underlying `format` method cannot work with arguments that are not convertible to string |
| 95 | 95 | // therefore we have to check that only those that actually can be used |
| 96 | - assert(call_user_func(function () use ($args) : bool { |
|
| 96 | + assert(call_user_func(function() use ($args) : bool { |
|
| 97 | 97 | $result = true; |
| 98 | 98 | foreach ($args as $arg) { |
| 99 | 99 | $result = $result && |