Conditions | 4 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function insertRows($rows) { |
||
27 | if (!(is_array($rows) || $rows instanceof Traversable)) { |
||
28 | throw new BadMethodCallException('Expected $rows to by an array or an instance of \\Traversable'); |
||
29 | } |
||
30 | $result = []; |
||
31 | $query = $this->__toString(); |
||
32 | $stmt = $this->db()->prepare($query); |
||
33 | foreach ($rows as $row) { |
||
34 | $stmt->execute($row); |
||
35 | $result[] = (int) $this->db()->getLastInsertId(); |
||
36 | } |
||
37 | $stmt->closeCursor(); |
||
38 | return $result; |
||
39 | } |
||
40 | |||
59 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.