Conditions | 3 |
Paths | 3 |
Total Lines | 22 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
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 | 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 | 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 | } |
||
60 | } |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.