| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | 2 | public function fromArray( array $geodata = null) : GeoData |
|
| 8 | { |
||
| 9 | 2 | $latitude = $geodata['latitude'] ?? null; |
|
| 10 | 2 | $longitude = $geodata['longitude'] ?? null; |
|
| 11 | 2 | $provider = $geodata['provider'] ?? null; |
|
| 12 | 2 | $status = $geodata['status'] ?? null; |
|
| 13 | |||
| 14 | 2 | return (new GeoData($latitude, $longitude, $provider))->setStatus( $status ); |
|
| 15 | } |
||
| 16 | } |