Conditions | 4 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
55 | 6 | public function assignValue(string $name, $value): bool |
|
56 | { |
||
57 | $names = [ |
||
58 | 6 | Inflector::get()->camelize($name, Inflector::DOWNCASE_FIRST_LETTER), |
|
59 | 6 | Inflector::get()->camelize($name, Inflector::UPCASE_FIRST_LETTER) |
|
60 | ]; |
||
61 | |||
62 | 6 | foreach ($names as $name) { |
|
63 | 6 | if ($this->setValueByMethod($name, $value) || $this->setValueByProperty($name, $value)) { |
|
64 | 6 | return true; |
|
65 | } |
||
66 | } |
||
67 | |||
68 | 1 | return false; |
|
69 | } |
||
70 | |||
78 | } |
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.