function Assert::isMap
@psalm-pure @psalm-template T @psalm-param mixed|array<T> $array @psalm-assert array<string, T> $array
Parameters
mixed $array:
string $message:
Throws
1 call to Assert::isMap()
- Assert::isNonEmptyMap in vendor/
webmozart/ assert/ src/ Assert.php - @psalm-pure @psalm-template T @psalm-param mixed|array<T> $array @psalm-assert array<string, T> $array @psalm-assert !empty $array
File
-
vendor/
webmozart/ assert/ src/ Assert.php, line 1871
Class
- Assert
- Efficient assertions to validate the input/output of your methods.
Namespace
Webmozart\AssertCode
public static function isMap($array, $message = '') {
if (!\is_array($array) || \array_keys($array) !== \array_filter(\array_keys($array), '\\is_string')) {
static::reportInvalidArgument($message ?: 'Expected map - associative array with string keys.');
}
}