function Assert::notEmpty
@psalm-pure @psalm-assert !empty $value
Parameters
mixed $value:
string $message:
Throws
2 calls to Assert::notEmpty()
- Assert::isNonEmptyList in vendor/
webmozart/ assert/ src/ Assert.php - @psalm-pure @psalm-assert non-empty-list $array
- 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 576
Class
- Assert
- Efficient assertions to validate the input/output of your methods.
Namespace
Webmozart\AssertCode
public static function notEmpty($value, $message = '') {
if (empty($value)) {
static::reportInvalidArgument(\sprintf($message ?: 'Expected a non-empty value. Got: %s', static::valueToString($value)));
}
}