Conditions | 3 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 3.1406 |
Changes | 2 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
13 | 7 | public static function create() |
|
14 | { |
||
15 | $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 |