Location   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 48
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A name() 0 4 1
A code() 0 4 1
1
<?php
2
3
namespace Jne;
4
5
use Jne\Contracts\Foundation\LocationInterface;
6
7
class Location implements LocationInterface
8
{
9
    /**
10
     * Location's name.
11
     *
12
     * @var string
13
     */
14
    protected $name;
15
16
    /**
17
     * Location's code.
18
     *
19
     * @var string
20
     */
21
    protected $code;
22
23
    /**
24
     * Create a new instance of Location.
25
     *
26
     * @param string $name
27
     * @param string $code
28
     */
29 10
    public function __construct($name, $code)
30
    {
31 10
        $this->name = $name;
32 10
        $this->code = $code;
33 10
    }
34
35
    /**
36
     * Get location's name.
37
     *
38
     * @return string
39
     */
40 3
    public function name()
41
    {
42 3
        return $this->name;
43
    }
44
45
    /**
46
     * Get location's code.
47
     *
48
     * @return string
49
     */
50 3
    public function code()
51
    {
52 3
        return $this->code;
53
    }
54
}
55