Initial checkin

This commit is contained in:
2019-07-08 01:13:30 +02:00
commit 6e662f0263
19 changed files with 795 additions and 0 deletions

View File

@ -0,0 +1,31 @@
<?php
namespace NoccyLabs\Juicer\Recipe\Mixer;
use NoccyLabs\Juicer\Ingredient\IngredientInterface;
use NoccyLabs\Juicer\Recipe\RecipeInterface;
use NoccyLabs\Juicer\Ingredient\Base;
use NoccyLabs\Juicer\Ingredient\NicotineBase;
class Mixer
{
public function mixRecipe(RecipeInterface $recipe, int $volume, Base $base, int $nicotineStrength, ?NicotineBase $nicotineBase=null)
{
$mixed = [];
$components = $base->getComponents();
if (array_key_exists('VG', $components) && $components['VG'] > 0) {
$mixed[] = new MeasuredIngredient("VG", null, "VG100", Base::MASS_VG, 100, $volume);
}
if (array_key_exists('PG', $components) && $components['PG'] > 0) {
$mixed[] = new MeasuredIngredient("PG", null, "PG100", Base::MASS_PG, 100, $volume);
}
return $mixed;
}
}