Conditions | 4 |
Paths | 5 |
Total Lines | 32 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 10 | ||
Bugs | 3 | Features | 3 |
1 | <?php |
||
38 | |||
39 | $backupJob->run(); |
||
40 | |||
41 | consoleOutput()->comment('Backup completed!'); |
||
42 | } catch (Exception $exception) { |
||
43 | event(new BackupHasFailed($exception)); |
||
44 | |||
45 | throw $exception; |
||
46 | } |
||
47 | } |
||
48 | |||
49 | protected function guardAgainstInvalidOptions() |
||
50 | { |
||
51 | if ($this->option('only-db') && $this->option('only-files')) { |
||
52 | throw InvalidCommand::create('Cannot use only-db and only-files together'); |
||
53 | } |
||
54 | } |
||
55 | } |
||
56 |
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: