| Conditions | 4 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function afterFind(Model $model, $results, $primary = false) { |
||
| 30 | $db = $model->getDataSource(); |
||
| 31 | |||
| 32 | $log = $db->getLog(); |
||
| 33 | $count = $log['count']; |
||
| 34 | |||
| 35 | if ($db instanceof Sqlite) { |
||
| 36 | foreach ($log['log'] as $log) { |
||
| 37 | if (strpos($log['query'], 'sqlite_master') !== false) { |
||
| 38 | --$count; |
||
| 39 | } |
||
| 40 | } |
||
| 41 | } |
||
| 42 | |||
| 43 | $this->runtime[$model->alias]['count'] += $count; |
||
| 44 | } |
||
| 45 | |||
| 57 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.