| Conditions | 4 |
| Paths | 3 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | 76 | public function setQualifiedName(?string $name) { |
|
| 42 | 76 | if ($name === null) { |
|
| 43 | 46 | return $this; |
|
| 44 | } |
||
| 45 | |||
| 46 | 44 | if (!TypeUtils::isGlobalQualifiedName($name) && false !== $pos = strrpos($name, '\\')) { |
|
| 47 | 8 | $this->namespace = trim(substr($name, 0, $pos), '\\'); |
|
| 48 | 8 | $this->name = substr($name, $pos + 1); |
|
| 49 | |||
| 50 | 8 | return $this; |
|
| 51 | } |
||
| 52 | |||
| 53 | 41 | $this->namespace = null; |
|
| 54 | 41 | $this->name = $name; |
|
| 55 | |||
| 56 | 41 | return $this; |
|
| 57 | } |
||
| 58 | |||
| 86 |