| Total Complexity | 4 |
| Total Lines | 106 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class Order extends Model |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | public $name; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | public $email; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | public $phone; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | public $comment; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @var array |
||
| 35 | */ |
||
| 36 | public $quantity = []; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | public function rules() |
||
| 74 | ], |
||
| 75 | ]; |
||
| 76 | } |
||
| 77 | |||
| 78 | /** |
||
| 79 | * {@inheritdoc} |
||
| 80 | */ |
||
| 81 | public function attributeLabels() |
||
| 82 | { |
||
| 83 | return [ |
||
| 84 | 'name' => Yii::t('order', 'Name'), |
||
| 85 | 'email' => Yii::t('order', 'Email'), |
||
| 86 | 'phone' => Yii::t('order', 'Phone'), |
||
| 87 | 'comment' => Yii::t('order', 'Comment'), |
||
| 88 | ]; |
||
| 89 | } |
||
| 90 | |||
| 91 | /** |
||
| 92 | * @param $email |
||
| 93 | * @return bool |
||
| 94 | */ |
||
| 95 | public function handle($email) |
||
| 117 | } |
||
| 118 | } |
||
| 119 |