Spatie\Backup\Exceptions\InvalidCommand::create PHP Method

create() public static method

public static create ( string $reason ) : InvalidCommand
$reason string
return InvalidCommand
    public static function create(string $reason) : InvalidCommand
    {
        return new static($reason);
    }

Usage Example

Example #1
0
 protected function guardAgainstInvalidOptions()
 {
     if ($this->option('only-db') && $this->option('only-files')) {
         throw InvalidCommand::create('Cannot use `only-db` and `only-files` together');
     }
 }
InvalidCommand