| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function getById($entity) { |
||
| 15 | $stmt = classSupernova::$gc->query |
||
|
|
|||
| 16 | ->setIdField($entity->getIdFieldName()) |
||
| 17 | ->field('*') |
||
| 18 | ->from($entity->getTableName()) |
||
| 19 | ->where($entity->getIdFieldName() . ' = "' . $entity->dbId . '"'); |
||
| 20 | |||
| 21 | $entity->importDbRow($stmt->selectRow()); |
||
| 22 | } |
||
| 23 | |||
| 63 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.