| Total Complexity | 3 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class OrderStatus extends Model implements MorphToIssuerable |
||
| 11 | { |
||
| 12 | use HasFactory, |
||
| 13 | Concerns\OrderStatus\Attribute, |
||
| 14 | Concerns\OrderStatus\Relation; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * {@inheritDoc} |
||
| 18 | */ |
||
| 19 | protected $fillable = [ |
||
| 20 | 'status', |
||
| 21 | 'note', |
||
| 22 | ]; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * {@inheritDoc} |
||
| 26 | */ |
||
| 27 | protected $casts = [ |
||
| 28 | 'status' => EnumOrderStatus::class, |
||
| 29 | ]; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Determine whether the current status is able to create order schedule. |
||
| 33 | * |
||
| 34 | * @return bool |
||
| 35 | */ |
||
| 36 | public function canCreateSchedule(): bool |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Determine whether the order has been scheduled. |
||
| 43 | * |
||
| 44 | * @return bool |
||
| 45 | */ |
||
| 46 | public function hasBeenScheduled(): bool |
||
| 53 |