| 1 | <?php  | 
            ||
| 12 | class TestItem implements Item  | 
            ||
| 13 | { | 
            ||
| 14 | /**  | 
            ||
| 15 | * @var string  | 
            ||
| 16 | */  | 
            ||
| 17 | private $description;  | 
            ||
| 18 | |||
| 19 | /**  | 
            ||
| 20 | * @var int  | 
            ||
| 21 | */  | 
            ||
| 22 | private $width;  | 
            ||
| 23 | |||
| 24 | /**  | 
            ||
| 25 | * @var int  | 
            ||
| 26 | */  | 
            ||
| 27 | private $length;  | 
            ||
| 28 | |||
| 29 | /**  | 
            ||
| 30 | * @var int  | 
            ||
| 31 | */  | 
            ||
| 32 | private $depth;  | 
            ||
| 33 | |||
| 34 | /**  | 
            ||
| 35 | * @var int  | 
            ||
| 36 | */  | 
            ||
| 37 | private $weight;  | 
            ||
| 38 | |||
| 39 | /**  | 
            ||
| 40 | * @var int  | 
            ||
| 41 | */  | 
            ||
| 42 | private $keepFlat;  | 
            ||
| 43 | |||
| 44 | /**  | 
            ||
| 45 | * @var int  | 
            ||
| 46 | */  | 
            ||
| 47 | private $volume;  | 
            ||
| 48 | |||
| 49 | /**  | 
            ||
| 50 | * TestItem constructor.  | 
            ||
| 51 | *  | 
            ||
| 52 | * @param string $description  | 
            ||
| 53 | * @param int $width  | 
            ||
| 54 | * @param int $length  | 
            ||
| 55 | * @param int $depth  | 
            ||
| 56 | * @param int $weight  | 
            ||
| 57 | * @param int $keepFlat  | 
            ||
| 58 | */  | 
            ||
| 59 | public function __construct($description, $width, $length, $depth, $weight, $keepFlat)  | 
            ||
| 60 |     { | 
            ||
| 61 | $this->description = $description;  | 
            ||
| 62 | $this->width = $width;  | 
            ||
| 63 | $this->length = $length;  | 
            ||
| 64 | $this->depth = $depth;  | 
            ||
| 65 | $this->weight = $weight;  | 
            ||
| 66 | $this->keepFlat = $keepFlat;  | 
            ||
| 67 | |||
| 68 | $this->volume = $this->width * $this->length * $this->depth;  | 
            ||
| 69 | }  | 
            ||
| 70 | |||
| 71 | /**  | 
            ||
| 72 | * @return string  | 
            ||
| 73 | */  | 
            ||
| 74 | public function getDescription()  | 
            ||
| 75 |     { | 
            ||
| 76 | return $this->description;  | 
            ||
| 77 | }  | 
            ||
| 78 | |||
| 79 | /**  | 
            ||
| 80 | * @return int  | 
            ||
| 81 | */  | 
            ||
| 82 | public function getWidth()  | 
            ||
| 83 |     { | 
            ||
| 84 | return $this->width;  | 
            ||
| 85 | }  | 
            ||
| 86 | |||
| 87 | /**  | 
            ||
| 88 | * @return int  | 
            ||
| 89 | */  | 
            ||
| 90 | public function getLength()  | 
            ||
| 91 |     { | 
            ||
| 92 | return $this->length;  | 
            ||
| 93 | }  | 
            ||
| 94 | |||
| 95 | /**  | 
            ||
| 96 | * @return int  | 
            ||
| 97 | */  | 
            ||
| 98 | public function getDepth()  | 
            ||
| 99 |     { | 
            ||
| 100 | return $this->depth;  | 
            ||
| 101 | }  | 
            ||
| 102 | |||
| 103 | /**  | 
            ||
| 104 | * @return int  | 
            ||
| 105 | */  | 
            ||
| 106 | public function getWeight()  | 
            ||
| 107 |     { | 
            ||
| 108 | return $this->weight;  | 
            ||
| 109 | }  | 
            ||
| 110 | |||
| 111 | /**  | 
            ||
| 112 | * @return int  | 
            ||
| 113 | */  | 
            ||
| 114 | public function getVolume()  | 
            ||
| 115 |     { | 
            ||
| 116 | return $this->volume;  | 
            ||
| 117 | }  | 
            ||
| 118 | |||
| 119 | /**  | 
            ||
| 120 | * @return int  | 
            ||
| 121 | */  | 
            ||
| 122 | public function getKeepFlat()  | 
            ||
| 123 |     { | 
            ||
| 124 | return $this->keepFlat;  | 
            ||
| 125 | }  | 
            ||
| 126 | }  | 
            ||
| 127 |