CallUrlModel::setIpstackKey()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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