Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
15 / 15 |
| GeolocFakerService | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
15 / 15 |
| query | |
100.00% |
1 / 1 |
1 | |
100.00% |
15 / 15 |
|||
| 1 | <?php |
| 2 | |
| 3 | namespace Qmp\Laravel\Geolocation\Services\GeolocApiServices; |
| 4 | |
| 5 | |
| 6 | class GeolocFakerService extends AbstractService |
| 7 | { |
| 8 | /** |
| 9 | * Return fake geolocation datas |
| 10 | * |
| 11 | * @return array |
| 12 | */ |
| 13 | protected function query() |
| 14 | { |
| 15 | return [ |
| 16 | 'ip' => $this->value, |
| 17 | 'lat' => 43.6728, |
| 18 | 'lon' => 7.1755, |
| 19 | 'zipcode' => '06700', |
| 20 | 'city' => 'Saint-Laurent-du-Var', |
| 21 | 'continent_code' => 'EU', |
| 22 | 'continent_name' => 'Europe', |
| 23 | 'is_in_european_union' => true, |
| 24 | 'country_iso_code' => 'FR', |
| 25 | 'country_name' => 'France', |
| 26 | 'state_code' => '06', |
| 27 | 'state_name' => 'Alpes-Maritimes', |
| 28 | 'timezone' => 'Europe/Paris', |
| 29 | 'organization' => 'Orange', |
| 30 | 'isp' => 'Orange', |
| 31 | 'domain' => null, |
| 32 | 'network' => '80.85.56.0/24', |
| 33 | 'datas' => [] |
| 34 | ]; |
| 35 | } |
| 36 | } |