| Total Complexity | 4 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 10 | class Company |
||
| 11 | { |
||
| 12 | private const TemplatePath = __DIR__.'/../Templates/company.json'; |
||
| 13 | |||
| 14 | protected Form $form; |
||
| 15 | |||
| 16 | public function __construct() |
||
| 17 | { |
||
| 18 | $this->form = new Form($this->templatePath()); |
||
| 19 | } |
||
| 20 | |||
| 21 | public function create() |
||
| 22 | { |
||
| 23 | return $this->form->readonly('mandatary') |
||
| 24 | ->value('status', Statuses::Active) |
||
| 25 | ->value('privacy', Privacy::Public) |
||
| 26 | ->meta('mandatary', 'custom', false) |
||
| 27 | ->meta('mandatary', 'placeholder', 'N/A') |
||
| 28 | ->create(); |
||
| 29 | } |
||
| 30 | |||
| 31 | public function edit(Model $company) |
||
| 36 | } |
||
| 37 | |||
| 38 | protected function templatePath(): string |
||
| 41 | } |
||
| 42 | } |
||
| 43 |