| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed'); |
||
| 41 | public function getUsed(int $userID) : array { |
||
| 42 | $query = $this->db->distinct() |
||
| 43 | ->select('category') |
||
| 44 | ->from('tracker_chapters') |
||
| 45 | ->where('tracker_chapters.active', 'Y') |
||
| 46 | ->where('user_id', $userID) |
||
| 47 | ->get(); |
||
| 48 | |||
| 49 | return array_column($query->result_array(), 'category'); |
||
| 50 | } |
||
| 51 | } |
||
| 52 |