| Conditions | 3 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 3.072 |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 13 | 7 | public static function create() |
|
| 14 | { |
||
| 15 | 7 | $pathGeneratorClass = BasePathGenerator::class; |
|
| 16 | // $customPathClass = config('medialibrary.custom_path_generator_class'); |
||
| 17 | // if ($customPathClass) { |
||
| 18 | // $pathGeneratorClass = $customPathClass; |
||
| 19 | // } |
||
| 20 | // static::guardAgainstInvalidPathGenerator($pathGeneratorClass); |
||
| 21 | 7 | if (function_exists('app') && app()) { |
|
| 22 | 7 | return app($pathGeneratorClass); |
|
| 23 | } |
||
| 24 | |||
| 25 | return new $pathGeneratorClass(); |
||
| 26 | } |
||
| 28 |