Guild   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 44
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getName() 0 4 1
A getRank() 0 4 1
1
<?php
2
3
namespace Igorsgm\TibiaDataApi\Models\Character;
4
5
use Igorsgm\TibiaDataApi\Exceptions\ImmutableException;
6
use Igorsgm\TibiaDataApi\Traits\ImmutableTrait;
7
use Igorsgm\TibiaDataApi\Traits\SerializableTrait;
8
9
class Guild
10
{
11
    use ImmutableTrait, SerializableTrait;
12
13
    /**
14
     * @var string
15
     */
16
    private $name;
17
18
    /**
19
     * @var string
20
     */
21
    private $rank;
22
23
    /**
24
     * Guild constructor.
25
     * @param  string  $name
26
     * @param  string  $rank
27
     * @throws ImmutableException
28
     */
29
    public function __construct(string $name, string $rank)
30
    {
31
        $this->handleImmutableConstructor();
32
33
        $this->name = $name;
34
        $this->rank = $rank;
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function getName(): string
41
    {
42
        return $this->name;
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function getRank(): string
49
    {
50
        return $this->rank;
51
    }
52
}
53