Conditions | 3 |
Paths | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
55 | public function __invoke( \DateTimeInterface $when, $php_class = null ) |
||
56 | { |
||
57 | if (!$this->stmt->execute([ |
||
58 | 'datetime_string' => $when->format("Y-m-d H:i:s") |
||
59 | ])) { |
||
60 | throw new \RuntimeException("Could not execute PDOStatement."); |
||
61 | } |
||
62 | |||
63 | |||
64 | $sheets = $this->stmt->fetchAll(\PDO::FETCH_CLASS, $php_class ?: $this->php_class); |
||
65 | |||
66 | return new \ArrayIterator( $sheets ); |
||
67 | } |
||
68 | |||
71 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..