Guild::getLogoUrl()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Igorsgm\TibiaDataApi\Models\Guilds;
4
5
use Igorsgm\TibiaDataApi\Exceptions\ImmutableException;
6
use Igorsgm\TibiaDataApi\Traits\ImmutableTrait;
7
use Igorsgm\TibiaDataApi\Traits\SerializableTrait;
8
9 View Code Duplication
class Guild
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
10
{
11
    use ImmutableTrait, SerializableTrait;
12
13
    /**
14
     * @var string
15
     */
16
    private $name;
17
18
    /**
19
     * @var string
20
     */
21
    private $description;
22
23
    /**
24
     * @var string
25
     */
26
    private $logoUrl;
27
28
    /**
29
     * @var bool
30
     */
31
    private $isActive;
32
33
    /**
34
     * Guild constructor.
35
     * @param  string  $name
36
     * @param  string  $description
37
     * @param  string  $logoUrl
38
     * @param  bool  $isActive
39
     * @throws ImmutableException
40
     */
41
    public function __construct(string $name, string $description, string $logoUrl, bool $isActive)
42
    {
43
        $this->handleImmutableConstructor();
44
45
        $this->name = $name;
46
        $this->description = $description;
47
        $this->logoUrl = $logoUrl;
48
        $this->isActive = $isActive;
49
    }
50
51
    /**
52
     * @return string
53
     */
54
    public function getName(): string
55
    {
56
        return $this->name;
57
    }
58
59
    /**
60
     * @return string
61
     */
62
    public function getDescription(): string
63
    {
64
        return $this->description;
65
    }
66
67
    /**
68
     * @return string
69
     */
70
    public function getLogoUrl(): string
71
    {
72
        return $this->logoUrl;
73
    }
74
75
    /**
76
     * @return bool
77
     */
78
    public function isActive(): bool
79
    {
80
        return $this->isActive;
81
    }
82
}
83