| @@ -31,22 +31,13 @@ | ||
| 31 | 31 | |
| 32 | 32 | public function getValueSanitizer(): callable |
| 33 | 33 | { |
| 34 | 34 | return function ($value) { |
| 35 | - if (! is_array($value)) { | |
| 36 | - $value = [$value]; | |
| 37 | - } | |
| 35 | + if (! is_array($value)) $value = [$value]; | |
| 38 | 36 | |
| 39 | - return array_filter( | |
| 40 | - $value, | |
| 41 | - function ($item) { | |
| 42 | - if (! is_scalar($item)) { | |
| 43 | - return false; | |
| 44 | - } | |
| 45 | - | |
| 46 | - return array_key_exists((string) $item, $this->options); | |
| 47 | - } | |
| 48 | - ); | |
| 37 | + return array_filter($value, function ($item) { | |
| 38 | + return array_key_exists($item, $this->options); | |
| 39 | + }); | |
| 49 | 40 | }; |
| 50 | 41 | } |
| 51 | 42 | |
| 52 | 43 | public function render(): void |