Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
23 | 6 | public function __construct(object $userinput, object $ip) |
|
24 | { |
||
25 | 6 | if ($userinput->getMethod() === "GET") { |
|
26 | 2 | $this->latitud = $userinput->getGet("lat", null); |
|
27 | 2 | $this->longitud = $userinput->getGet("lon", null); |
|
28 | 2 | $this->userip = $userinput->getGet("ip", null); |
|
29 | 5 | } elseif ($userinput->getMethod() === "POST") { |
|
30 | 3 | $this->latitud = $userinput->getPost("latitud", null); |
|
31 | 3 | $this->longitud = $userinput->getPost("longitud", null); |
|
32 | 3 | $this->userip = $userinput->getPost("userip", null); |
|
33 | } else { |
||
34 | 3 | $this->latitud = ""; |
|
35 | 3 | $this->longitud = ""; |
|
36 | 3 | $this->userip = ""; |
|
37 | } |
||
38 | 6 | $this->ip = $ip; |
|
39 | 6 | } |
|
61 |