Spatie\DbDumper\Exceptions\CannotStartDump::emptyParameter PHP Метод

emptyParameter() публичный статический Метод

public static emptyParameter ( string $name ) : CannotStartDump
$name string
Результат CannotStartDump
    public static function emptyParameter($name)
    {
        return new static("Parameter `{$name}` cannot be empty.");
    }

Usage Example

Пример #1
0
 protected function guardAgainstIncompleteCredentials()
 {
     foreach (['userName', 'dbName', 'host'] as $requiredProperty) {
         if (empty($this->{$requiredProperty})) {
             throw CannotStartDump::emptyParameter($requiredProperty);
         }
     }
 }
CannotStartDump