Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 9 |
Ratio | 100 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
52 | 8 | View Code Duplication | public function setHost(string $host) : self { |
53 | 8 | $this->host = trim($host); |
|
54 | |||
55 | 8 | if ($this->host === '') { |
|
56 | 2 | throw new EmptyArgumentException('host'); |
|
57 | } |
||
58 | |||
59 | 8 | return $this; |
|
60 | } |
||
61 | |||
98 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.