From b2bd9301b6259ffc24f4b477ada0c29c3d0fbef7 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 22 Dec 2023 07:53:00 +0100 Subject: [PATCH] Small phpcs fixes. --- .ci/php-cs-fixer/.php-cs-fixer.php | 2 +- app/Api/V1/Controllers/Chart/AccountController.php | 4 ++-- app/Api/V1/Controllers/Data/Bulk/TransactionController.php | 4 ++-- app/Api/V1/Controllers/Data/Export/ExportController.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.ci/php-cs-fixer/.php-cs-fixer.php b/.ci/php-cs-fixer/.php-cs-fixer.php index 7475d96d5e..40c69e75d7 100644 --- a/.ci/php-cs-fixer/.php-cs-fixer.php +++ b/.ci/php-cs-fixer/.php-cs-fixer.php @@ -55,7 +55,7 @@ return $config->setRules([ ], ], 'statement_indentation' => true, - 'type_declaration_spaces' => false, + 'type_declaration_spaces' => true, 'cast_spaces' => false, 'binary_operator_spaces' => false, 'void_return' => true, diff --git a/app/Api/V1/Controllers/Chart/AccountController.php b/app/Api/V1/Controllers/Chart/AccountController.php index 0b4847d255..189b92baa2 100644 --- a/app/Api/V1/Controllers/Chart/AccountController.php +++ b/app/Api/V1/Controllers/Chart/AccountController.php @@ -70,7 +70,7 @@ class AccountController extends Controller * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/charts/getChartAccountOverview * * @throws FireflyException - * * @throws ContainerExceptionInterface + * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ public function overview(DateRequest $request): JsonResponse @@ -108,7 +108,7 @@ class AccountController extends Controller } $currentSet = [ 'label' => $account->name, - 'currency_id' => (string)$currency->id, + 'currency_id' => (string) $currency->id, 'currency_code' => $currency->code, 'currency_symbol' => $currency->symbol, 'currency_decimal_places' => $currency->decimal_places, diff --git a/app/Api/V1/Controllers/Data/Bulk/TransactionController.php b/app/Api/V1/Controllers/Data/Bulk/TransactionController.php index 983bca915f..24009d8c1a 100644 --- a/app/Api/V1/Controllers/Data/Bulk/TransactionController.php +++ b/app/Api/V1/Controllers/Data/Bulk/TransactionController.php @@ -70,8 +70,8 @@ class TransactionController extends Controller // to respond to what is in the $query. // this is OK because only one thing can be in the query at the moment. if ($this->isUpdateTransactionAccount($params)) { - $original = $this->repository->find((int)$params['where']['account_id']); - $destination = $this->repository->find((int)$params['update']['account_id']); + $original = $this->repository->find((int) $params['where']['account_id']); + $destination = $this->repository->find((int) $params['update']['account_id']); /** @var AccountDestroyService $service */ $service = app(AccountDestroyService::class); diff --git a/app/Api/V1/Controllers/Data/Export/ExportController.php b/app/Api/V1/Controllers/Data/Export/ExportController.php index 580c0d02db..167a8445f3 100644 --- a/app/Api/V1/Controllers/Data/Export/ExportController.php +++ b/app/Api/V1/Controllers/Data/Export/ExportController.php @@ -232,7 +232,7 @@ class ExportController extends Controller ->header('Expires', '0') ->header('Cache-Control', 'must-revalidate, post-check=0, pre-check=0') ->header('Pragma', 'public') - ->header('Content-Length', (string)strlen($data[$key])) + ->header('Content-Length', (string) strlen($data[$key])) ; return $response;