55 lines
921 B
PHP
55 lines
921 B
PHP
<?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;
|
|
}
|
|
|
|
} |