We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3287848 commit ac96636Copy full SHA for ac96636
src/Support/Str.php
@@ -7,13 +7,13 @@ class Str
7
/**
8
* Determine if a given string matches a given pattern.
9
*/
10
- public static function is(string|iterable $pattern, string $value): bool
+ public static function is(string|iterable $patterns, string $value): bool
11
{
12
- if (! is_iterable($pattern)) {
13
- $pattern = [$pattern];
+ if (! is_iterable($patterns)) {
+ $patterns = [$patterns];
14
}
15
16
- foreach ($pattern as $pattern) {
+ foreach ($patterns as $pattern) {
17
$pattern = (string) $pattern;
18
19
// If the given value is an exact match we can of course return true right
0 commit comments