| Conditions | 3 |
| Paths | 8 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public static function checkTableName($table) |
||
| 30 | { |
||
| 31 | try { |
||
| 32 | $dbConnect = new DBConnect(); |
||
| 33 | $result = $dbConnect->getConnection()->query('SELECT 1 FROM ' . $table . ' LIMIT 1'); |
||
| 34 | if ($result !== false) { |
||
| 35 | return $table; |
||
| 36 | } |
||
| 37 | } catch (PDOException $e) { |
||
| 38 | return $e->getMessage(); |
||
| 39 | } |
||
| 40 | finally { |
||
| 41 | $dbConnect = null; |
||
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 55 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.