Completed
Push — 2.x-dev ( 266dac...34f8fe )
by Doug
10:05
created

ItemTooLargeException::getItem()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
/**
4
 * Box packing (3D bin packing, knapsack problem)
5
 * @package BoxPacker
6
 * @author Doug Wright
7
 */
8
namespace DVDoug\BoxPacker;
9
10
/**
11
 * Class ItemTooLargeException
12
 * Exception used when an item is too large to pack
13
 *
14
 * @package DVDoug\BoxPacker
15
 */
16
class ItemTooLargeException extends \RuntimeException
17
{
18
19
    /** @var Item */
20
    public $item;
21
22
    /**
23
     * ItemTooLargeException constructor.
24
     *
25
     * @param string $message
26
     * @param Item   $item
27
     */
28 2
    public function __construct($message, Item $item) {
29 2
        $this->item = $item;
30 2
        parent::__construct($message);
31
    }
32
33
    /**
34
     * @return Item
35
     */
36
    public function getItem() {
37
        return $this->item;
38
    }
39
40
}
41