| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php namespace Arcanedev\LaravelTracker\Trackers; |
||
| 48 | public function track($ipAddress) |
||
| 49 | { |
||
| 50 | if ($data = $this->geoIpDetector->search($ipAddress)) { |
||
| 51 | $model = GeoIp::firstOrCreate(Arr::only($data, ['latitude', 'longitude']), $data); |
||
| 52 | |||
| 53 | return $model->id; |
||
| 54 | } |
||
| 55 | |||
| 56 | return null; |
||
| 57 | } |
||
| 58 | } |
||
| 59 |