| Total Complexity | 5 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class OrderItemWithConstructor extends ActiveRecord |
||
| 19 | { |
||
| 20 | public static function tableName(): string |
||
| 21 | { |
||
| 22 | return 'order_item'; |
||
| 23 | } |
||
| 24 | |||
| 25 | public function __construct($item_id, $quantity) |
||
| 26 | { |
||
| 27 | $this->item_id = $item_id; |
||
| 28 | $this->quantity = $quantity; |
||
| 29 | |||
| 30 | parent::__construct(); |
||
|
|
|||
| 31 | } |
||
| 32 | |||
| 33 | public static function instance($refresh = false): self |
||
| 34 | { |
||
| 35 | return self::instantiate([]); |
||
| 36 | } |
||
| 37 | |||
| 38 | public static function instantiate($row): self |
||
| 41 | } |
||
| 42 | |||
| 43 | public function getOrder(): ActiveQuery |
||
| 46 | } |
||
| 47 | } |
||
| 48 |