Conditions | 2 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php namespace Propaganistas\LaravelPhone\Traits; |
||
25 | 96 | protected function parseCountries($countries) |
|
26 | { |
||
27 | 96 | return Collection::make(is_array($countries) ? $countries : func_get_args()) |
|
28 | ->map(function ($country) { |
||
29 | 96 | return strtoupper($country); |
|
30 | 96 | }) |
|
31 | 96 | ->filter(function ($value) { |
|
32 | 96 | return static::isValidCountryCode($value); |
|
33 | 96 | })->toArray(); |
|
34 | } |
||
35 | } |