manuall readded reverted changes

This commit is contained in:
Patrick Henninger
2019-01-09 13:06:16 +01:00
parent 6767fdd944
commit 70073ccb92
8 changed files with 281 additions and 180 deletions

View File

@@ -21,6 +21,11 @@ class BuyableProduct implements Buyable
*/
private $price;
/**
* @var float
*/
private $weight;
/**
* BuyableProduct constructor.
*
@@ -28,11 +33,12 @@ class BuyableProduct implements Buyable
* @param string $name
* @param float $price
*/
public function __construct($id = 1, $name = 'Item name', $price = 10.00)
public function __construct($id = 1, $name = 'Item name', $price = 10.00, $weight = 0)
{
$this->id = $id;
$this->name = $name;
$this->price = $price;
$this->weight = $weight;
}
/**
@@ -64,4 +70,14 @@ class BuyableProduct implements Buyable
{
return $this->price;
}
/**
* Get the price of the Buyable item.
*
* @return float
*/
public function getBuyableWeight($options = null)
{
return $this->weight;
}
}