Initial checkin
This commit is contained in:
55
src/Ingredient/Ingredient.php
Normal file
55
src/Ingredient/Ingredient.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace NoccyLabs\Juicer\Ingredient;
|
||||
|
||||
class Ingredient implements IngredientInterface
|
||||
{
|
||||
protected $name;
|
||||
|
||||
protected $brand;
|
||||
|
||||
protected $percent;
|
||||
|
||||
protected $base;
|
||||
|
||||
public function __construct(string $name, ?string $brand=null, float $percent=0.0, string $base="PG100")
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->brand = $brand;
|
||||
$this->percent = $percent;
|
||||
$this->base = $base;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getFlavorName(): string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getFlavorBrand(): ?string
|
||||
{
|
||||
return $this->brand;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getPercent(): float
|
||||
{
|
||||
return $this->percent;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getBase(): ?string
|
||||
{
|
||||
return $this->base;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user