| Conditions | 3 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 14 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 96 | 3 | public function __construct(array $param = []) |
|
| 97 | { |
||
| 98 | 3 | parent::__construct($param); |
|
| 99 | 3 | $this->rules = [ |
|
| 100 | 3 | 'number' => 'required', |
|
| 101 | 3 | 'weight' => 'required|numeric', |
|
| 102 | 3 | 'length' => 'required|numeric', |
|
| 103 | 3 | 'width' => 'required|numeric', |
|
| 104 | 3 | 'height' => 'required|numeric', |
|
| 105 | 3 | 'items' => [ |
|
| 106 | 3 | 'required', 'array', |
|
| 107 | 3 | function ($value) { |
|
| 108 | 1 | foreach ($value as $item) { |
|
| 109 | 1 | if ($item instanceof Item) { |
|
| 110 | 1 | $item->validate(); |
|
| 111 | } |
||
| 118 |