Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
39 | 65 | public function setQualifiedName(?string $name) { |
|
40 | 65 | if ($name === null) { |
|
41 | 45 | return; |
|
42 | } |
||
43 | |||
44 | 26 | if (false !== $pos = strrpos($name, '\\')) { |
|
45 | 6 | $this->namespace = trim(substr($name, 0, $pos), '\\'); |
|
46 | 6 | $this->name = substr($name, $pos + 1); |
|
47 | |||
48 | 6 | return $this; |
|
49 | } |
||
50 | |||
51 | 22 | $this->namespace = null; |
|
52 | 22 | $this->name = $name; |
|
53 | |||
54 | 22 | return $this; |
|
55 | } |
||
56 | |||
79 |