@@ -75,8 +75,8 @@ discard block |
||
| 75 | 75 | * |
| 76 | 76 | * @return string[] |
| 77 | 77 | */ |
| 78 | - static function (Options $options, $value): array { |
|
| 79 | - if (! $value) { |
|
| 78 | + static function(Options $options, $value): array { |
|
| 79 | + if (!$value) { |
|
| 80 | 80 | return $value; |
| 81 | 81 | } |
| 82 | 82 | |
@@ -89,11 +89,11 @@ discard block |
||
| 89 | 89 | { |
| 90 | 90 | $resolver->define('locale') |
| 91 | 91 | ->allowedTypes('string') |
| 92 | - ->allowedValues(static function (string $value): bool { |
|
| 93 | - return ! ! Normalize::locale($value); |
|
| 92 | + ->allowedValues(static function(string $value): bool { |
|
| 93 | + return !!Normalize::locale($value); |
|
| 94 | 94 | }) |
| 95 | 95 | ->default('en') |
| 96 | - ->normalize(static function (Options $options, string $value): string { |
|
| 96 | + ->normalize(static function(Options $options, string $value): string { |
|
| 97 | 97 | return Normalize::locale($value); |
| 98 | 98 | }); |
| 99 | 99 | } |
@@ -102,10 +102,10 @@ discard block |
||
| 102 | 102 | { |
| 103 | 103 | $resolver->define('native') |
| 104 | 104 | ->allowedTypes('bool') |
| 105 | - ->default(static function (Options $options): bool { |
|
| 105 | + ->default(static function(Options $options): bool { |
|
| 106 | 106 | return \in_array($options['locale'], DatasetInterface::NON_LATIN_LOCALES, true); |
| 107 | 107 | }) |
| 108 | - ->normalize(static function (Options $options, bool $value) { |
|
| 108 | + ->normalize(static function(Options $options, bool $value) { |
|
| 109 | 109 | return $value && \in_array($options['locale'], DatasetInterface::NON_LATIN_LOCALES, true); |
| 110 | 110 | }); |
| 111 | 111 | } |
@@ -133,11 +133,11 @@ discard block |
||
| 133 | 133 | protected function definePresetAllowedValues($value): bool |
| 134 | 134 | { |
| 135 | 135 | foreach ((array) $value as $v) { |
| 136 | - if (! \in_array($v, ShortcodeInterface::SUPPORTED_PRESETS, true)) { |
|
| 136 | + if (!\in_array($v, ShortcodeInterface::SUPPORTED_PRESETS, true)) { |
|
| 137 | 137 | throw new InvalidOptionsException(\sprintf( |
| 138 | 138 | 'The option "preset" with value "%s" is invalid. Accepted values are: %s.', |
| 139 | 139 | $v, |
| 140 | - \implode(', ', \array_map(static function ($s) { |
|
| 140 | + \implode(', ', \array_map(static function($s) { |
|
| 141 | 141 | return \sprintf('"%s"', $s); |
| 142 | 142 | }, ShortcodeInterface::SUPPORTED_PRESETS)) |
| 143 | 143 | )); |