| Total Complexity | 13 |
| Total Lines | 132 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class License |
||
| 10 | { |
||
| 11 | /** @var string */ |
||
| 12 | protected $shortName; |
||
| 13 | /** @var string[] */ |
||
| 14 | protected $can; |
||
| 15 | /** @var string[] */ |
||
| 16 | protected $cannot; |
||
| 17 | /** @var string[] */ |
||
| 18 | protected $must; |
||
| 19 | /** @var string */ |
||
| 20 | protected $source; |
||
| 21 | /** @var DateTimeInterface */ |
||
| 22 | protected $createdAt; |
||
| 23 | |||
| 24 | 2 | public function __construct(string $shortName) |
|
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | 1 | public function getShortName(): string |
|
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param string $shortName |
||
| 39 | * @return License |
||
| 40 | */ |
||
| 41 | 3 | public function setShortName(string $shortName): self |
|
| 42 | { |
||
| 43 | 3 | $this->shortName = $shortName; |
|
| 44 | |||
| 45 | 3 | return $this; |
|
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return string[] |
||
| 50 | */ |
||
| 51 | 1 | public function getCan(): array |
|
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param string[] $can |
||
| 58 | * @return License |
||
| 59 | */ |
||
| 60 | 5 | public function setCan(array $can): self |
|
| 61 | { |
||
| 62 | 5 | $this->can = $can; |
|
| 63 | |||
| 64 | 5 | return $this; |
|
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @return string[] |
||
| 69 | */ |
||
| 70 | 1 | public function getCannot(): array |
|
| 71 | { |
||
| 72 | 1 | return $this->cannot; |
|
| 73 | } |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @param string[] $cannot |
||
| 77 | * @return License |
||
| 78 | */ |
||
| 79 | 5 | public function setCannot(array $cannot): self |
|
| 84 | } |
||
| 85 | |||
| 86 | /** |
||
| 87 | * @return string[] |
||
| 88 | */ |
||
| 89 | 1 | public function getMust(): array |
|
| 92 | } |
||
| 93 | |||
| 94 | /** |
||
| 95 | * @param string[] $must |
||
| 96 | * @return License |
||
| 97 | */ |
||
| 98 | 5 | public function setMust(array $must): self |
|
| 99 | { |
||
| 100 | 5 | $this->must = $must; |
|
| 101 | |||
| 102 | 5 | return $this; |
|
| 103 | } |
||
| 104 | |||
| 105 | /** |
||
| 106 | * @return string |
||
| 107 | */ |
||
| 108 | 3 | public function getSource(): string |
|
| 109 | { |
||
| 110 | 3 | return $this->source; |
|
| 111 | } |
||
| 112 | |||
| 113 | /** |
||
| 114 | * @param string $source |
||
| 115 | * @return License |
||
| 116 | */ |
||
| 117 | 5 | public function setSource(string $source): self |
|
| 118 | { |
||
| 119 | 5 | $this->source = $source; |
|
| 120 | |||
| 121 | 5 | return $this; |
|
| 122 | } |
||
| 123 | |||
| 124 | /** |
||
| 125 | * @return DateTimeInterface |
||
| 126 | */ |
||
| 127 | 1 | public function getCreatedAt(): DateTimeInterface |
|
| 128 | { |
||
| 129 | 1 | return $this->createdAt; |
|
| 130 | } |
||
| 131 | |||
| 132 | /** |
||
| 133 | * @param DateTimeInterface $createdAt |
||
| 134 | * @return License |
||
| 135 | */ |
||
| 136 | 5 | public function setCreatedAt(DateTimeInterface $createdAt): self |
|
| 141 | } |
||
| 142 | } |
||
| 143 |