| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3.3332 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | 7 | public function getBasePathForMedia() |
|
| 39 | { |
||
| 40 | 7 | $method = 'getBasePathForMedia'; |
|
| 41 | 7 | $manager = $this->getRecord()->getManager(); |
|
|
|
|||
| 42 | |||
| 43 | 7 | $media = $this->newMedia(); |
|
| 44 | |||
| 45 | 7 | if (method_exists($manager, $method)) { |
|
| 46 | $path = $manager->$method($media); |
||
| 47 | if (!empty($path)) { |
||
| 48 | return $path; |
||
| 49 | } |
||
| 50 | } |
||
| 51 | |||
| 52 | 7 | return PathGeneratorFactory::create()::$method($media); |
|
| 53 | } |
||
| 76 |