Skip to content

Commit d4345b2

Browse files
Merge branch '5.4' into 6.0
* 5.4: Leverage str_contains/str_starts_with Leverage str_ends_with
2 parents da500d2 + 849f869 commit d4345b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

OptionsResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ public function offsetGet(mixed $option, bool $triggerDeprecation = true)
10311031
$fmtAllowedTypes = implode('" or "', $this->allowedTypes[$option]);
10321032
$fmtProvidedTypes = implode('|', array_keys($invalidTypes));
10331033
$allowedContainsArrayType = \count(array_filter($this->allowedTypes[$option], static function ($item) {
1034-
return '[]' === substr($item, -2);
1034+
return str_ends_with($item, '[]');
10351035
})) > 0;
10361036

10371037
if (\is_array($value) && $allowedContainsArrayType) {

0 commit comments

Comments
 (0)