Conditions | 4 |
Paths | 4 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
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 | } |
||
46 | 20 | if (!boolval($statement->rowCount()) && $this->getIsStrict()) { |
|
47 | 5 | throw $exceptionToThrow; |
|
48 | } |
||
49 | 15 | return true; |
|
50 | } |
||
51 | } |
||
52 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.