AccountInformation::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 7
Ratio 100 %

Importance

Changes 0
Metric Value
dl 7
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
namespace Igorsgm\TibiaDataApi\Models\Character;
4
5
use Carbon\Carbon;
6
use Igorsgm\TibiaDataApi\Exceptions\ImmutableException;
7
use Igorsgm\TibiaDataApi\Traits\ImmutableTrait;
8
use Igorsgm\TibiaDataApi\Traits\SerializableTrait;
9
10 View Code Duplication
class AccountInformation
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...
11
{
12
    use ImmutableTrait, SerializableTrait;
13
14
    /**
15
     * @var string
16
     */
17
    private $loyaltyTitle;
18
19
    /**
20
     * @var Carbon
21
     */
22
    private $created;
23
24
    /**
25
     * AccountInformation constructor.
26
     *
27
     * @param  string  $loyaltyTitle
28
     * @param  Carbon  $created
29
     * @throws ImmutableException
30
     */
31
    public function __construct(string $loyaltyTitle, Carbon $created)
32
    {
33
        $this->handleImmutableConstructor();
34
35
        $this->loyaltyTitle = $loyaltyTitle;
36
        $this->created = $created;
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getLoyaltyTitle(): string
43
    {
44
        return $this->loyaltyTitle;
45
    }
46
47
    /**
48
     * @return Carbon
49
     */
50
    public function getCreated(): Carbon
51
    {
52
        return $this->created;
53
    }
54
}
55