Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 10 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
76 | View Code Duplication | public function exec($query) |
|
77 | { |
||
78 | $result = parent::exec($query); |
||
79 | if (false === $result) { |
||
80 | $this->checkGoneAway(); |
||
81 | $result = parent::exec($query); |
||
82 | } |
||
83 | |||
84 | return $result; |
||
85 | } |
||
86 | } |
||
87 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.