| Total Complexity | 7 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | final class EditPostRequest extends RequestModel implements ValidatableModelInterface |
||
| 16 | { |
||
| 17 | public function getId(): int |
||
| 18 | { |
||
| 19 | return (int)$this->getValue('attributes.id'); |
||
| 20 | } |
||
| 21 | |||
| 22 | public function getTitle(): string |
||
| 23 | { |
||
| 24 | return (string)$this->getValue('body.title'); |
||
| 25 | } |
||
| 26 | |||
| 27 | public function getText(): string |
||
| 28 | { |
||
| 29 | return (string)$this->getValue('body.text'); |
||
| 30 | } |
||
| 31 | |||
| 32 | public function getStatus(): PostStatus |
||
| 33 | { |
||
| 34 | return new PostStatus($this->getValue('body.status')); |
||
| 35 | } |
||
| 36 | |||
| 37 | public function getUser(): User |
||
| 43 | } |
||
| 44 | |||
| 45 | public function getRules(): array |
||
| 68 | }, |
||
| 69 | ], |
||
| 70 | ]; |
||
| 73 |