Applied PHP-CS-Fixer rules

This commit is contained in:
Bernd Bestel
2020-09-01 21:29:47 +02:00
parent 3da8904cba
commit 836bcc82e5
56 changed files with 150 additions and 467 deletions

View File

@@ -2,8 +2,6 @@
namespace Grocy\Services;
#use \Grocy\Services\StockService;
use LessQL\Result;
class RecipesService extends BaseService
@@ -42,11 +40,8 @@ class RecipesService extends BaseService
]);
$shoppinglistRow->save();
}
}
}
}
public function ConsumeRecipe($recipeId)
@@ -65,7 +60,6 @@ class RecipesService extends BaseService
{
$this->getStockService()->ConsumeProduct($recipePosition->product_id, $recipePosition->recipe_amount, false, StockService::TRANSACTION_TYPE_CONSUME, 'default', $recipeId, null, $transactionId, true);
}
}
$recipeRow = $this->getDatabase()->recipes()->where('id = :1', $recipeId)->fetch();
@@ -75,7 +69,6 @@ class RecipesService extends BaseService
$recipeResolvedRow = $this->getDatabase()->recipes_resolved()->where('recipe_id = :1', $recipeId)->fetch();
$this->getStockService()->AddProduct($recipeRow->product_id, floatval($recipeRow->desired_servings), null, StockService::TRANSACTION_TYPE_SELF_PRODUCTION, date('Y-m-d'), floatval($recipeResolvedRow->costs));
}
}
public function GetRecipesPosResolved()
@@ -99,5 +92,4 @@ class RecipesService extends BaseService
$recipeRow = $this->getDataBase()->recipes()->where('id = :1', $recipeId)->fetch();
return $recipeRow !== null;
}
}