OtherCharacter   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 59
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 2
dl 0
loc 59
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getName() 0 4 1
A getWorld() 0 4 1
A getStatus() 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 OtherCharacter
10
{
11
    use ImmutableTrait, SerializableTrait;
12
13
    /**
14
     * @var string
15
     */
16
    private $name;
17
18
    /**
19
     * @var string
20
     */
21
    private $world;
22
23
    /**
24
     * @var string
25
     */
26
    private $status;
27
28
    /**
29
     * OtherCharacter constructor.
30
     * @param  string  $name
31
     * @param  string  $world
32
     * @param  string  $status
33
     * @throws ImmutableException
34
     */
35
    public function __construct(string $name, string $world, string $status)
36
    {
37
        $this->handleImmutableConstructor();
38
39
        $this->name = $name;
40
        $this->world = $world;
41
        $this->status = $status;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getName(): string
48
    {
49
        return $this->name;
50
    }
51
52
    /**
53
     * @return string
54
     */
55
    public function getWorld(): string
56
    {
57
        return $this->world;
58
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function getStatus(): string
64
    {
65
        return $this->status;
66
    }
67
}
68