| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | public function canBePackedInBox(ItemList $alreadyPackedItems, Box $box) |
||
| 28 | { |
||
| 29 | $alreadyPackedType = array_filter( |
||
| 30 | $alreadyPackedItems->asArray(), |
||
| 31 | function(TestItem $item) { |
||
| 32 | return $item->getDescription() === $this->getDescription(); |
||
| 33 | } |
||
| 34 | ); |
||
| 35 | |||
| 36 | return count($alreadyPackedType) + 1 <= static::$limit; |
||
| 37 | } |
||
| 38 | } |
||
| 40 |