Mild code cleanup.

This commit is contained in:
James Cole 2023-08-26 18:42:18 +02:00
parent 63297c43b7
commit 66cc3f48bc
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80
10 changed files with 85 additions and 79 deletions

View File

@ -379,16 +379,16 @@
}, },
{ {
"name": "friendsofphp/php-cs-fixer", "name": "friendsofphp/php-cs-fixer",
"version": "v3.22.0", "version": "v3.23.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
"reference": "92b019f6c8d79aa26349d0db7671d37440dc0ff3" "reference": "35af3cbbacfa91e164b252a28ec0b644f1ed4e78"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/92b019f6c8d79aa26349d0db7671d37440dc0ff3", "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/35af3cbbacfa91e164b252a28ec0b644f1ed4e78",
"reference": "92b019f6c8d79aa26349d0db7671d37440dc0ff3", "reference": "35af3cbbacfa91e164b252a28ec0b644f1ed4e78",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -464,7 +464,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.22.0" "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.23.0"
}, },
"funding": [ "funding": [
{ {
@ -472,7 +472,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-07-16T23:08:06+00:00" "time": "2023-08-14T12:27:35+00:00"
}, },
{ {
"name": "psr/cache", "name": "psr/cache",
@ -745,16 +745,16 @@
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v6.3.2", "version": "v6.3.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "aa5d64ad3f63f2e48964fc81ee45cb318a723898" "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/aa5d64ad3f63f2e48964fc81ee45cb318a723898", "url": "https://api.github.com/repos/symfony/console/zipball/eca495f2ee845130855ddf1cf18460c38966c8b6",
"reference": "aa5d64ad3f63f2e48964fc81ee45cb318a723898", "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -815,7 +815,7 @@
"terminal" "terminal"
], ],
"support": { "support": {
"source": "https://github.com/symfony/console/tree/v6.3.2" "source": "https://github.com/symfony/console/tree/v6.3.4"
}, },
"funding": [ "funding": [
{ {
@ -831,7 +831,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-07-19T20:17:28+00:00" "time": "2023-08-16T10:10:12+00:00"
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
@ -1744,16 +1744,16 @@
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v6.3.2", "version": "v6.3.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
"reference": "c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d" "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d", "url": "https://api.github.com/repos/symfony/process/zipball/0b5c29118f2e980d455d2e34a5659f4579847c54",
"reference": "c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d", "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1785,7 +1785,7 @@
"description": "Executes commands in sub-processes", "description": "Executes commands in sub-processes",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/process/tree/v6.3.2" "source": "https://github.com/symfony/process/tree/v6.3.4"
}, },
"funding": [ "funding": [
{ {
@ -1801,7 +1801,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-07-12T16:00:22+00:00" "time": "2023-08-07T10:39:22+00:00"
}, },
{ {
"name": "symfony/service-contracts", "name": "symfony/service-contracts",

View File

@ -1,4 +1,6 @@
<?php <?php
declare(strict_types=1);
/* /*
* StoreController.php * StoreController.php
* Copyright (c) 2023 james@firefly-iii.org * Copyright (c) 2023 james@firefly-iii.org

View File

@ -87,11 +87,13 @@ class BoxController extends Controller
$availableBudgets = $availableBudgets->filter( $availableBudgets = $availableBudgets->filter(
static function (AvailableBudget $availableBudget) use ($currency) { static function (AvailableBudget $availableBudget) use ($currency) {
if ($availableBudget->transaction_currency_id === $currency->id) { if ($availableBudget->transaction_currency_id === $currency->id) {
app('log')->debug(sprintf('Will include AB #%d: from %s-%s amount %s', app('log')->debug(sprintf(
'Will include AB #%d: from %s-%s amount %s',
$availableBudget->id, $availableBudget->id,
$availableBudget->start_date->format('Y-m-d'), $availableBudget->start_date->format('Y-m-d'),
$availableBudget->end_date->format('Y-m-d'), $availableBudget->end_date->format('Y-m-d'),
$availableBudget->amount)); $availableBudget->amount
));
return $availableBudget; return $availableBudget;
} }

View File

@ -43,7 +43,9 @@ class NewAccessToken extends Notification
* *
* @return void * @return void
*/ */
public function __construct() {} public function __construct()
{
}
/** /**
* Get the array representation of the notification. * Get the array representation of the notification.

View File

@ -1,4 +1,6 @@
<?php <?php
declare(strict_types=1);
/* /*
* UrlValidator.php * UrlValidator.php
* Copyright (c) 2023 james@firefly-iii.org * Copyright (c) 2023 james@firefly-iii.org
@ -26,7 +28,6 @@ namespace FireflyIII\Support\Notifications;
*/ */
class UrlValidator class UrlValidator
{ {
/** /**
* @param string $url * @param string $url
* *

View File

@ -204,8 +204,7 @@ trait TransactionValidation
array $transaction, array $transaction,
string $transactionType, string $transactionType,
int $index int $index
): void ): void {
{
Log::debug('Now in sanityCheckForeignCurrency()'); Log::debug('Now in sanityCheckForeignCurrency()');
if (0 !== $validator->errors()->count()) { if (0 !== $validator->errors()->count()) {
Log::debug('Already have errors, return'); Log::debug('Already have errors, return');