Invitee::getInvited()   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
4
namespace Igorsgm\TibiaDataApi\Models\Guild;
5
6
use Carbon\Carbon;
7
use Igorsgm\TibiaDataApi\Exceptions\ImmutableException;
8
use Igorsgm\TibiaDataApi\Traits\ImmutableTrait;
9
use Igorsgm\TibiaDataApi\Traits\SerializableTrait;
10
11 View Code Duplication
class Invitee
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...
12
{
13
    use ImmutableTrait, SerializableTrait;
14
15
    /**
16
     * @var string
17
     */
18
    private $name;
19
20
    /**
21
     * @var Carbon
22
     */
23
    private $invited;
24
25
    /**
26
     * Invitee constructor.
27
     * @param  string  $name
28
     * @param  Carbon  $invited
29
     * @throws ImmutableException
30
     */
31
    public function __construct(string $name, Carbon $invited)
32
    {
33
        $this->handleImmutableConstructor();
34
35
        $this->name = $name;
36
        $this->invited = $invited;
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getName(): string
43
    {
44
        return $this->name;
45
    }
46
47
    /**
48
     * @return Carbon
49
     */
50
    public function getInvited(): Carbon
51
    {
52
        return $this->invited;
53
    }
54
}
55