for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Box packing (3D bin packing, knapsack problem)
* @package BoxPacker
* @author Doug Wright
*/
namespace DVDoug\BoxPacker\Test;
use DVDoug\BoxPacker\Item;
class TestItem implements Item
{
* @var string
private $description;
* @var int
private $width;
private $length;
private $depth;
private $weight;
private $volume;
* TestItem constructor.
*
* @param string $description
* @param int $width
* @param int $length
* @param int $depth
* @param int $weight
public function __construct($description, $width, $length, $depth, $weight)
$this->description = $description;
$this->width = $width;
$this->length = $length;
$this->depth = $depth;
$this->weight = $weight;
$this->volume = $this->width * $this->length * $this->depth;
}
* @return string
public function getDescription()
return $this->description;
* @return int
public function getWidth()
return $this->width;
public function getLength()
return $this->length;
public function getDepth()
return $this->depth;
public function getWeight()
return $this->weight;
public function getVolume()
return $this->volume;