| Total Complexity | 8 |
| Total Lines | 79 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class AdminResource implements IStringerEntity |
||
| 10 | { |
||
| 11 | protected string $id; |
||
| 12 | |||
| 13 | protected string $identifier; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Block constructor. |
||
| 17 | * |
||
| 18 | * @param string $id |
||
| 19 | * @param string $identifier |
||
| 20 | */ |
||
| 21 | public function __construct(string $id, string $identifier) |
||
| 22 | { |
||
| 23 | $this->id = $id; |
||
| 24 | $this->identifier = $identifier; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @return string |
||
| 29 | */ |
||
| 30 | public function getId() |
||
| 31 | { |
||
| 32 | return $this->id; |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param string $id |
||
| 37 | */ |
||
| 38 | public function setId($id) |
||
| 39 | { |
||
| 40 | $this->id = $id; |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | public function getIdentifier(): string |
||
| 47 | { |
||
| 48 | return $this->identifier; |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @param string $identifier |
||
| 53 | * |
||
| 54 | * @return $this |
||
| 55 | */ |
||
| 56 | public function setIdentifier(string $identifier): AdminResource |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @return string |
||
| 65 | */ |
||
| 66 | public function __toString(): string |
||
| 67 | { |
||
| 68 | return $this->getIdentifier(); |
||
| 69 | } |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @return array|null |
||
| 73 | */ |
||
| 74 | public function toData(): ?array |
||
| 79 | ]; |
||
| 80 | } |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @return string |
||
| 84 | */ |
||
| 85 | public function toJSON(): string |
||
| 88 | } |
||
| 89 | } |
||
| 90 |