Skip to content

Commit 41b8ea1

Browse files
committed
Switch to short array type everywhere
1 parent 82d24c3 commit 41b8ea1

File tree

4 files changed

+611
-611
lines changed

4 files changed

+611
-611
lines changed

.php-cs-fixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
'@PSR2' => true,
1212
'@Symfony' => true,
1313
'ordered_imports' => true,
14-
'array_syntax' => ['syntax' => 'long'],
14+
'array_syntax' => ['syntax' => 'short'],
1515
'fully_qualified_strict_types' => false,
1616
'global_namespace_import' => true,
1717
'no_superfluous_phpdoc_tags' => false,

src/Assert.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ public static function isInstanceOfAny(mixed $value, mixed $classes, string $mes
500500
static::reportInvalidArgument(\sprintf(
501501
$message ?: 'Expected an instance of any of %2$s. Got: %s',
502502
static::typeToString($value),
503-
\implode(', ', \array_map(array(static::class, 'valueToString'), \iterator_to_array($classes)))
503+
\implode(', ', \array_map([static::class, 'valueToString'], \iterator_to_array($classes)))
504504
));
505505
}
506506

@@ -1024,7 +1024,7 @@ public static function inArray(mixed $value, mixed $values, string $message = ''
10241024
static::reportInvalidArgument(\sprintf(
10251025
$message ?: 'Expected one of: %2$s. Got: %s',
10261026
static::valueToString($value),
1027-
\implode(', ', \array_map(array(static::class, 'valueToString'), $values))
1027+
\implode(', ', \array_map([static::class, 'valueToString'], $values))
10281028
));
10291029
}
10301030

@@ -1063,7 +1063,7 @@ public static function notInArray(mixed $value, mixed $values, string $message =
10631063
static::reportInvalidArgument(\sprintf(
10641064
$message ?: '%2$s was not expected to contain a value. Got: %s',
10651065
static::valueToString($value),
1066-
\implode(', ', \array_map(array('static', 'valueToString'), $values))
1066+
\implode(', ', \array_map(['static', 'valueToString'], $values))
10671067
));
10681068
}
10691069

@@ -2028,7 +2028,7 @@ public static function uuid(mixed $value, string $message = ''): string
20282028
static::string($value, $message);
20292029

20302030
$originalValue = $value;
2031-
$value = \str_replace(array('urn:', 'uuid:', '{', '}'), '', $value);
2031+
$value = \str_replace(['urn:', 'uuid:', '{', '}'], '', $value);
20322032

20332033
// The nil UUID is special form of UUID that is specified to have all
20342034
// 128 bits set to zero.

0 commit comments

Comments
 (0)