CallUrlModel   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 36
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setIpAddress() 0 3 1
A setIpstackKey() 0 3 1
1
<?php
2
/**
3
 * Showing off a standard class with methods and properties.
4
 */
5
namespace Erjh17\CallUrlModel;
6
7
use Anax\Commons\ContainerInjectableInterface;
8
use Anax\Commons\ContainerInjectableTrait;
9
10
class CallUrlModel implements ContainerInjectableInterface
11
{
12
    use IpModelTrait;
13
    use GeoModelTrait;
14
    use WeatherModelTrait;
15
    use ContainerInjectableTrait;
16
17
    /**
18
     * Constructor to set the IpAddress.
19
     *
20
     * @param string $ipAddress The ip address to be stored.
21
     */
22 27
    public function __construct(string $ipAddress = null)
23
    {
24 27
        $this->setIpAddress($ipAddress);
25 27
        $this->errorMsg = "";
26 27
    }
27
28
    /**
29
     * [setDarkskyKey description]
30
     *
31
     * @param string $key [description]
32
     */
33 27
    public function setIpstackKey($key)
34
    {
35 27
        $this->ipstackkey = $key;
36 27
    }
37
38
    /**
39
     * [setIpAddress description]
40
     *
41
     * @param string|null $ipAddress [description]
42
     */
43 27
    public function setIpAddress(string $ipAddress = null)
44
    {
45 27
        $this->ipAddress = trim($ipAddress);
46 27
    }
47
}
48