| Conditions | 3 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 82 | public function __construct(array $param = []) |
||
| 83 | { |
||
| 84 | parent::__construct($param); |
||
| 85 | $this->rules = [ |
||
| 86 | 'number' => 'required', |
||
| 87 | 'weight' => 'required|numeric', |
||
| 88 | 'length' => 'required|numeric', |
||
| 89 | 'width' => 'required|numeric', |
||
| 90 | 'height' => 'required|numeric', |
||
| 91 | 'items' => [ |
||
| 92 | 'required', 'array', |
||
| 93 | function ($value) { |
||
| 94 | foreach ($value as $item) { |
||
| 95 | if ($item instanceof Item) { |
||
| 96 | $item->validate(); |
||
| 97 | } |
||
| 104 |