Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
49 | 11 | public function getFootprint() |
|
50 | { |
||
51 | 11 | $layerWidth = 0; |
|
52 | 11 | $layerLength = 0; |
|
53 | |||
54 | 11 | foreach ($this->items as $item) { |
|
55 | 11 | $layerWidth = max($layerWidth, $item->getX() + $item->getWidth()); |
|
56 | 11 | $layerLength = max($layerLength, $item->getY() + $item->getLength()); |
|
57 | } |
||
58 | |||
59 | 11 | return $layerWidth * $layerLength; |
|
60 | } |
||
94 |