| Total Complexity | 6 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | class CustomerForArrayable extends ActiveRecord |
||
| 13 | { |
||
| 14 | public array $items = []; |
||
| 15 | |||
| 16 | public ?CustomerForArrayable $item = null; |
||
| 17 | |||
| 18 | protected int $id; |
||
| 19 | protected string $email; |
||
| 20 | protected string|null $name = null; |
||
| 21 | protected string|null $address = null; |
||
| 22 | protected int|null $status = 0; |
||
| 23 | protected bool|string|null $bool_status = false; |
||
| 24 | protected int|null $profile_id = null; |
||
| 25 | |||
| 26 | public function getTableName(): string |
||
| 27 | { |
||
| 28 | return 'customer'; |
||
| 29 | } |
||
| 30 | |||
| 31 | public function fields(): array |
||
| 39 | } |
||
| 40 | |||
| 41 | public function setItem(self $item) |
||
| 42 | { |
||
| 43 | $this->item = $item; |
||
| 44 | } |
||
| 45 | |||
| 46 | public function setItems(self ...$items) |
||
| 47 | { |
||
| 48 | $this->items = $items; |
||
| 49 | } |
||
| 50 | |||
| 51 | public function toArray(array $fields = [], array $expand = [], bool $recursive = true): array |
||
| 58 | } |
||
| 59 | } |
||
| 60 |