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