Total Complexity | 8 |
Total Lines | 77 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
15 | class PackedLayer |
||
16 | { |
||
17 | /** |
||
18 | * Items packed into this layer. |
||
19 | * |
||
20 | * @var PackedItem[] |
||
21 | */ |
||
22 | protected $items = []; |
||
23 | |||
24 | /** |
||
25 | * Add a packed item to this layer. |
||
26 | * |
||
27 | * @param PackedItem $packedItem |
||
28 | */ |
||
29 | 19 | public function insert(PackedItem $packedItem) |
|
30 | { |
||
31 | 19 | $this->items[] = $packedItem; |
|
32 | 19 | } |
|
33 | |||
34 | /** |
||
35 | * Get the packed items. |
||
36 | * |
||
37 | * @return PackedItem[] |
||
38 | */ |
||
39 | 19 | public function getItems() |
|
42 | } |
||
43 | |||
44 | /** |
||
45 | * Calculate footprint area of this layer. |
||
46 | * |
||
47 | * @return int mm^2 |
||
48 | */ |
||
49 | 11 | public function getFootprint() |
|
60 | } |
||
61 | |||
62 | /** |
||
63 | * Calculate start depth of this layer. |
||
64 | * |
||
65 | * @return int mm |
||
66 | */ |
||
67 | 19 | public function getStartDepth() |
|
76 | } |
||
77 | |||
78 | /** |
||
79 | * Calculate depth of this layer. |
||
80 | * |
||
81 | * @return int mm |
||
82 | */ |
||
83 | 19 | public function getDepth() |
|
94 |