Skip to content

Commit 282aa98

Browse files
committed
Leverage str_starts_with(), str_ends_with() and str_contains()
1 parent be0facf commit 282aa98

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
@@ -1134,7 +1134,7 @@ public function offsetGet(mixed $option, bool $triggerDeprecation = true): mixed
11341134

11351135
private function verifyTypes(string $type, mixed $value, array &$invalidTypes, int $level = 0): bool
11361136
{
1137-
if (\is_array($value) && '[]' === substr($type, -2)) {
1137+
if (\is_array($value) && str_ends_with($type, '[]')) {
11381138
$type = substr($type, 0, -2);
11391139
$valid = true;
11401140

0 commit comments

Comments
 (0)