| Total Complexity | 13 |
| Total Lines | 138 |
| Duplicated Lines | 0 % |
| Changes | 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 | public function __construct(string $shortName) |
||
| 25 | { |
||
| 26 | $this->shortName = $shortName; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | public function getShortName(): string |
||
| 33 | { |
||
| 34 | return $this->shortName; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param string $shortName |
||
| 39 | * |
||
| 40 | * @return License |
||
| 41 | */ |
||
| 42 | public function setShortName(string $shortName): self |
||
| 43 | { |
||
| 44 | $this->shortName = $shortName; |
||
| 45 | |||
| 46 | return $this; |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return string[] |
||
| 51 | */ |
||
| 52 | public function getCan(): array |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @param string[] $can |
||
| 59 | * |
||
| 60 | * @return License |
||
| 61 | */ |
||
| 62 | public function setCan(array $can): self |
||
| 63 | { |
||
| 64 | $this->can = $can; |
||
| 65 | |||
| 66 | return $this; |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return string[] |
||
| 71 | */ |
||
| 72 | public function getCannot(): array |
||
| 73 | { |
||
| 74 | return $this->cannot; |
||
| 75 | } |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @param string[] $cannot |
||
| 79 | * |
||
| 80 | * @return License |
||
| 81 | */ |
||
| 82 | public function setCannot(array $cannot): self |
||
| 87 | } |
||
| 88 | |||
| 89 | /** |
||
| 90 | * @return string[] |
||
| 91 | */ |
||
| 92 | public function getMust(): array |
||
| 95 | } |
||
| 96 | |||
| 97 | /** |
||
| 98 | * @param string[] $must |
||
| 99 | * |
||
| 100 | * @return License |
||
| 101 | */ |
||
| 102 | public function setMust(array $must): self |
||
| 103 | { |
||
| 104 | $this->must = $must; |
||
| 105 | |||
| 106 | return $this; |
||
| 107 | } |
||
| 108 | |||
| 109 | /** |
||
| 110 | * @return string |
||
| 111 | */ |
||
| 112 | public function getSource(): string |
||
| 113 | { |
||
| 114 | return $this->source; |
||
| 115 | } |
||
| 116 | |||
| 117 | /** |
||
| 118 | * @param string $source |
||
| 119 | * |
||
| 120 | * @return License |
||
| 121 | */ |
||
| 122 | public function setSource(string $source): self |
||
| 123 | { |
||
| 124 | $this->source = $source; |
||
| 125 | |||
| 126 | return $this; |
||
| 127 | } |
||
| 128 | |||
| 129 | /** |
||
| 130 | * @return DateTimeInterface |
||
| 131 | */ |
||
| 132 | public function getCreatedAt(): DateTimeInterface |
||
| 133 | { |
||
| 134 | return $this->createdAt; |
||
| 135 | } |
||
| 136 | |||
| 137 | /** |
||
| 138 | * @param DateTimeInterface $createdAt |
||
| 139 | * |
||
| 140 | * @return License |
||
| 141 | */ |
||
| 142 | public function setCreatedAt(DateTimeInterface $createdAt): self |
||
| 147 | } |
||
| 148 | } |
||
| 149 |