Removed type conversions where no longer needed

PHP 8.1 PDO SQLite now returns native data types
This commit is contained in:
Bernd Bestel
2023-02-06 20:22:10 +01:00
parent d8d3c3ef0b
commit d9667b4534
46 changed files with 257 additions and 272 deletions

View File

@@ -53,7 +53,7 @@ class GenericEntityApiController extends BaseApiController
// TODO: This should be better done somehow in StockService
if ($args['entity'] == 'products' && boolval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount')))
{
$this->getStockService()->AddMissingProductsToShoppingList(intval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount_list_id')));
$this->getStockService()->AddMissingProductsToShoppingList($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount_list_id'));
}
return $this->ApiResponse($response, [
@@ -167,7 +167,7 @@ class GenericEntityApiController extends BaseApiController
// TODO: This should be better done somehow in StockService
if ($args['entity'] == 'products' && boolval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount')))
{
$this->getStockService()->AddMissingProductsToShoppingList(intval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount_list_id')));
$this->getStockService()->AddMissingProductsToShoppingList($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount_list_id'));
}
return $this->EmptyApiResponse($response);