| Conditions | 3 | 
| Paths | 8 | 
| Total Lines | 15 | 
| Code Lines | 8 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 9 | 
| CRAP Score | 3 | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 26 | 69 | public function getColumnsFromQuery($tableName, $query)  | 
            |
| 27 |     { | 
            ||
| 28 | 69 | $columns = [];  | 
            |
| 29 | |||
| 30 |         try { | 
            ||
| 31 | 69 | $information = $this->pdo->prepare($query);  | 
            |
| 32 | |||
| 33 | 69 | $information->execute();  | 
            |
| 34 | 69 | $information->setFetchMode(\PDO::FETCH_OBJ);  | 
            |
| 35 | 69 |         } catch (\PDOException $e) { | 
            |
| 36 | // Table not found  | 
            ||
| 37 | }  | 
            ||
| 38 | |||
| 39 | 69 |         while ($row = $information->fetch()) { | 
            |
| 40 | 63 | array_push($columns, $this->setColumn($tableName, $row));  | 
            |
| 41 | 63 | }  | 
            |
| 55 |