| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | 4 | public function createInlineFqnBasedOnImportedFqn(ImportedFqn $importedFqn, Name $name): ?Fqn |
|
| 14 | { |
||
| 15 | 4 | if (count($name->parts) === 1) { |
|
| 16 | 4 | return null; |
|
| 17 | } |
||
| 18 | |||
| 19 | // Set importedFqn as non-class (folder namespace) |
||
| 20 | 1 | $importedFqn->isNotClass(); |
|
| 21 | |||
| 22 | 1 | $nameParts = $name->parts; |
|
| 23 | 1 | array_shift($nameParts); |
|
| 24 | |||
| 25 | 1 | return new Fqn(sprintf('%s\%s', $importedFqn->fqn, implode('\\', $nameParts))); |
|
| 26 | } |
||
| 28 |