mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Mild code cleanup.
This commit is contained in:
parent
63297c43b7
commit
66cc3f48bc
36
.ci/php-cs-fixer/composer.lock
generated
36
.ci/php-cs-fixer/composer.lock
generated
@ -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",
|
||||||
|
@ -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
|
||||||
|
@ -138,7 +138,7 @@ class IndexController extends Controller
|
|||||||
|
|
||||||
// get budgeted for default currency:
|
// get budgeted for default currency:
|
||||||
if (0 === count($availableBudgets)) {
|
if (0 === count($availableBudgets)) {
|
||||||
$budgeted = $this->blRepository->budgeted($start, $end, $defaultCurrency,);
|
$budgeted = $this->blRepository->budgeted($start, $end, $defaultCurrency, );
|
||||||
$spentArr = $this->opsRepository->sumExpenses($start, $end, null, null, $defaultCurrency);
|
$spentArr = $this->opsRepository->sumExpenses($start, $end, null, null, $defaultCurrency);
|
||||||
$spent = $spentArr[$defaultCurrency->id]['sum'] ?? '0';
|
$spent = $spentArr[$defaultCurrency->id]['sum'] ?? '0';
|
||||||
unset($spentArr);
|
unset($spentArr);
|
||||||
@ -197,7 +197,7 @@ class IndexController extends Controller
|
|||||||
$array['spent'] = $spentArr[$entry->transaction_currency_id]['sum'] ?? '0';
|
$array['spent'] = $spentArr[$entry->transaction_currency_id]['sum'] ?? '0';
|
||||||
|
|
||||||
// budgeted in period:
|
// budgeted in period:
|
||||||
$budgeted = $this->blRepository->budgeted($entry->start_date, $entry->end_date, $entry->transactionCurrency,);
|
$budgeted = $this->blRepository->budgeted($entry->start_date, $entry->end_date, $entry->transactionCurrency, );
|
||||||
$array['budgeted'] = $budgeted;
|
$array['budgeted'] = $budgeted;
|
||||||
$availableBudgets[] = $array;
|
$availableBudgets[] = $array;
|
||||||
unset($spentArr);
|
unset($spentArr);
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
||||||
|
@ -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
|
||||||
*
|
*
|
||||||
|
@ -302,7 +302,7 @@ class TransactionGroupTransformer extends AbstractTransformer
|
|||||||
if (null === $string) {
|
if (null === $string) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// Log::debug(sprintf('Now in date("%s")', $string));
|
// Log::debug(sprintf('Now in date("%s")', $string));
|
||||||
if (10 === strlen($string)) {
|
if (10 === strlen($string)) {
|
||||||
return Carbon::createFromFormat('Y-m-d', $string, config('app.timezone'));
|
return Carbon::createFromFormat('Y-m-d', $string, config('app.timezone'));
|
||||||
}
|
}
|
||||||
|
@ -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');
|
||||||
|
Loading…
Reference in New Issue
Block a user