Skip to content

Commit 89ecb57

Browse files
gharlannicolas-grekas
authored andcommitted
optimize in_array calls
1 parent 7ea0c86 commit 89ecb57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

AbstractUnicodeString.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public function match(string $regexp, int $flags = 0, int $offset = 0): array
264264

265265
public function normalize(int $form = self::NFC): static
266266
{
267-
if (!\in_array($form, [self::NFC, self::NFD, self::NFKC, self::NFKD])) {
267+
if (!\in_array($form, [self::NFC, self::NFD, self::NFKC, self::NFKD], true)) {
268268
throw new InvalidArgumentException('Unsupported normalization form.');
269269
}
270270

0 commit comments

Comments
 (0)