| Conditions | 4 |
| Paths | 4 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | 20 | public function checkAffected(PDOStatement $statement, \Exception $exceptionToThrow = null) |
|
| 42 | { |
||
| 43 | 20 | if (!$exceptionToThrow instanceof \Exception) { |
|
| 44 | 4 | $exceptionToThrow = new NoRecordsAffectedException(); |
|
| 45 | 4 | } |
|
| 46 | 20 | if (!boolval($statement->rowCount()) && $this->getIsStrict()) { |
|
| 47 | 5 | throw $exceptionToThrow; |
|
| 48 | } |
||
| 49 | 15 | return true; |
|
| 50 | } |
||
| 51 | } |
||
| 52 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.