| Conditions | 2 |
| Paths | 1 |
| Total Lines | 34 |
| Code Lines | 13 |
| Lines | 10 |
| Ratio | 29.41 % |
| Tests | 14 |
| CRAP Score | 2.0011 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | 2 | public function install(): void |
|
| 41 | { |
||
| 42 | 2 | $this->require('illuminate/log "5.6.*"'); |
|
| 43 | |||
| 44 | 2 | $this->task( |
|
|
|
|||
| 45 | 2 | 'Creating default logging configuration', |
|
| 46 | 2 | View Code Duplication | function () { |
| 47 | 2 | if (! File::exists(config_path('logging.php'))) { |
|
| 48 | 2 | return File::copy( |
|
| 49 | 2 | static::CONFIG_FILE, |
|
| 50 | 2 | config_path('logging.php') |
|
| 51 | ); |
||
| 52 | } |
||
| 53 | |||
| 54 | return false; |
||
| 55 | 2 | } |
|
| 56 | ); |
||
| 57 | |||
| 58 | 2 | $this->info('Usage:'); |
|
| 59 | 2 | $this->comment( |
|
| 60 | 2 | ' |
|
| 61 | use Illuminate\Support\Facades\Log; |
||
| 62 | |||
| 63 | Log::emergency($message); |
||
| 64 | Log::alert($message); |
||
| 65 | Log::critical($message); |
||
| 66 | Log::error($message); |
||
| 67 | Log::warning($message); |
||
| 68 | Log::notice($message); |
||
| 69 | Log::info($message); |
||
| 70 | Log::debug($message); |
||
| 71 | ' |
||
| 72 | ); |
||
| 73 | 2 | } |
|
| 74 | } |
||
| 75 |
If you implement
__calland 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
__callis implemented by a parent class and only the child class knows which methods exist: