| Conditions | 3 |
| Paths | 3 |
| Total Lines | 24 |
| Code Lines | 14 |
| Lines | 10 |
| Ratio | 41.67 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | public function execute() |
||
| 37 | { |
||
| 38 | $db = $this->dbHandle; |
||
| 39 | $db->sqliteCreateFunction('log', 'log', 1); |
||
| 40 | $sql = ' |
||
| 41 | INSERT INTO inverse_document_frequency (term, inverseDocumentFrequency) |
||
| 42 | SELECT DISTINCT term, (1+(log(:documentCount / COUNT(documentPath) + 1))) as inverseDocumentFrequency |
||
| 43 | FROM term_count |
||
| 44 | GROUP BY term |
||
| 45 | '; |
||
| 46 | |||
| 47 | View Code Duplication | if (!$stmt = $db->prepare($sql)) { |
|
| 48 | $errorInfo = $db->errorInfo(); |
||
| 49 | $errorMsg = $errorInfo[2]; |
||
| 50 | throw new \Exception('SQLite Exception: ' . $errorMsg . ' in SQL: <br /><pre>' . $sql . '</pre>'); |
||
| 51 | } |
||
| 52 | $stmt->bindValue(':documentCount', $this->documentCount); |
||
| 53 | $result = $stmt->execute(); |
||
| 54 | View Code Duplication | if ($result === false) { |
|
| 55 | $errorInfo = $db->errorInfo(); |
||
| 56 | $errorMsg = $errorInfo[2]; |
||
| 57 | throw new \Exception('SQLite Exception: ' . $errorMsg . ' in SQL: <br /><pre>' . $sql . '</pre>'); |
||
| 58 | } |
||
| 59 | } |
||
| 60 | } |
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..