| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | 83 | public function getClass(Interfaces\IStorage $storage, ?IFLTranslations $lang = null): ADirs |
|
| 18 | { |
||
| 19 | 83 | if ($storage instanceof Interfaces\IPassDirs) { |
|
| 20 | 50 | if ($storage->isFlat()) { |
|
| 21 | 23 | return new CanDirFlat($storage); |
|
| 22 | } else { |
||
| 23 | 27 | return new CanDirRecursive($storage, $lang); |
|
| 24 | } |
||
| 25 | } else { |
||
| 26 | 33 | return new Basic($storage, $lang); |
|
| 27 | } |
||
| 30 |