CardTrait   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getBlocked() 0 3 1
A getBlockedDate() 0 3 1
A setBlocked() 0 4 1
A setBlockedDate() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the core-library package.
5
 *
6
 * (c) 2018 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Library\Core\ThirdParty\SkiData\Traits;
13
14
use DateTime;
15
16
/**
17
 * Card trait.
18
 *
19
 * @author webeweb <https://github.com/webeweb/>
20
 * @package WBW\Library\Core\ThirdParty\SkiData\Traits
21
 */
22
trait CardTrait {
23
24
    /**
25
     * Blocked.
26
     *
27
     * @var bool|null
28
     */
29
    private $blocked;
30
31
    /**
32
     * Blocked as of date.
33
     *
34
     * @var DateTime|null
35
     */
36
    private $blockedDate;
37
38
    /**
39
     * Get the blocked.
40
     *
41
     * @return bool|null Returns the blocked.
42
     */
43
    public function getBlocked(): ?bool {
44
        return $this->blocked;
45
    }
46
47
    /**
48
     * Get the blocked as of date.
49
     *
50
     * @return DateTime|null Returns the blocked as of date.
51
     */
52
    public function getBlockedDate(): ?DateTime {
53
        return $this->blockedDate;
54
    }
55
56
    /**
57
     * Set the blocked.
58
     *
59
     * @param bool|null $blocked The blocked.
60
     * @return self Returns this instance.
61
     */
62
    public function setBlocked(?bool $blocked): self {
63
        $this->blocked = $blocked;
64
        return $this;
65
    }
66
67
    /**
68
     * Set the blocked as of date.
69
     *
70
     * @param DateTime|null $blockedDate The blocked as of date.
71
     * @return self Returns this instance.
72
     */
73
    public function setBlockedDate(?DateTime $blockedDate): self {
74
        $this->blockedDate = $blockedDate;
75
        return $this;
76
    }
77
}
78