| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 9 |
| Ratio | 100 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 4 | View Code Duplication | public function setPath(string $path) : self { |
| 33 | 4 | $this->path = trim($path); |
|
| 34 | |||
| 35 | 4 | if ($this->path === '') { |
|
| 36 | 2 | throw new EmptyArgumentException('path'); |
|
| 37 | } |
||
| 38 | |||
| 39 | 4 | return $this; |
|
| 40 | } |
||
| 41 | |||
| 63 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.