| Conditions | 5 |
| Paths | 5 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | public function detectQueryType() |
||
| 36 | { |
||
| 37 | // make sure we have a query type |
||
| 38 | switch (strtolower(substr($this->query, 0, 6))) { |
||
| 39 | case 'insert': |
||
| 40 | return 'INSERT'; |
||
| 41 | |||
| 42 | case 'update': |
||
| 43 | return 'UPDATE'; |
||
| 44 | |||
| 45 | case 'delete': |
||
| 46 | return 'DELETE'; |
||
| 47 | |||
| 48 | case 'select': |
||
| 49 | return 'SELECT'; |
||
| 50 | |||
| 51 | default: |
||
| 52 | return 'QUERY'; |
||
| 53 | } |
||
| 100 |