| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 48 | 1 | public static function getRegionsByCountry($countryId) |
|
| 49 | { |
||
| 50 | 1 | $ret = self::join('region_translations', 'regions.id', '=', 'region_translations.region_id') |
|
| 51 | 1 | ->where('locale', 'en') |
|
| 52 | 1 | ->where('country_id', $countryId) |
|
| 53 | 1 | ->orderBy('name') |
|
| 54 | 1 | ->pluck('name', 'region_translations.region_id AS id'); |
|
| 55 | |||
| 56 | 1 | return $ret; |
|
| 57 | } |
||
| 59 |