Conditions | 2 |
Paths | 2 |
Total Lines | 22 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
37 | public function getZonesByCountryId($country_id) |
||
38 | { |
||
39 | $zone_data = $this->cache->get('zone.' . (int)$country_id); |
||
40 | |||
41 | if (!$zone_data) { |
||
42 | $query = $this->db->query(" |
||
43 | SELECT * |
||
44 | FROM zone |
||
45 | WHERE country_id = '" . (int)$country_id . "' |
||
46 | AND status = '1' |
||
47 | ORDER BY name |
||
48 | "); |
||
49 | |||
50 | $zone_data = $query->rows; |
||
51 | |||
52 | $this->cache->set( |
||
53 | 'zone.' . (int)$country_id, |
||
54 | $zone_data |
||
55 | ); |
||
56 | } |
||
57 | |||
58 | return $zone_data; |
||
59 | } |
||
61 |
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.