Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 9 |
Ratio | 100 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
30 | 8 | View Code Duplication | public function setDbName(string $dbName) : self { |
31 | 8 | $this->dbName = trim($dbName); |
|
32 | |||
33 | 8 | if ($this->dbName === '') { |
|
34 | 2 | throw new EmptyArgumentException('dbName'); |
|
35 | } |
||
36 | |||
37 | 8 | return $this; |
|
38 | } |
||
39 | |||
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.