Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
47 | 5 | public static function init(string $type, string $disk, string $path, string $name, ?\Closure $tap = null): static |
|
48 | { |
||
49 | 5 | $model = new static(); |
|
50 | 5 | $model->type = $type; |
|
51 | 5 | $model->disk = $disk; |
|
52 | 5 | $model->path = $path; |
|
53 | 5 | $model->name = $name; |
|
54 | |||
55 | 5 | if(is_callable($tap)) { |
|
56 | 5 | $tap($model); |
|
57 | } |
||
58 | |||
59 | 5 | return $model; |
|
60 | } |
||
72 |