Code cleanup that (hopefully) matches style CI

This commit is contained in:
James Cole
2020-03-17 15:01:00 +01:00
parent bd2f064eeb
commit 2b6c3fd743
110 changed files with 2060 additions and 1660 deletions

View File

@@ -18,7 +18,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/** @noinspection MoreThanThreeArgumentsInspection */
/** @noinspection MoreThanThreeArgumentsInspection */
declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Chart;
@@ -118,8 +118,6 @@ class BudgetReportController extends Controller
// loop expenses.
foreach ($spent as $currency) {
foreach ($currency['budgets'] as $budget) {
foreach ($budget['transaction_journals'] as $journal) {
$categoryName = $journal['category_name'] ?? trans('firefly.no_category');
$title = sprintf('%s (%s)', $categoryName, $currency['currency_name']);
@@ -157,8 +155,6 @@ class BudgetReportController extends Controller
// loop expenses.
foreach ($spent as $currency) {
foreach ($currency['budgets'] as $budget) {
foreach ($budget['transaction_journals'] as $journal) {
$title = sprintf('%s (%s)', $journal['destination_account_name'], $currency['currency_name']);
$result[$title] = $result[$title] ?? [
@@ -199,7 +195,9 @@ class BudgetReportController extends Controller
$spentKey = sprintf('%d-spent', $currency['currency_id']);
$chartData[$spentKey] = $chartData[$spentKey] ?? [
'label' => sprintf(
'%s (%s)', (string)trans('firefly.spent_in_specific_budget', ['budget' => $budget->name]), $currency['currency_name']
'%s (%s)',
(string) trans('firefly.spent_in_specific_budget', ['budget' => $budget->name]),
$currency['currency_name']
),
'type' => 'bar',
'currency_symbol' => $currency['currency_symbol'],
@@ -240,8 +238,6 @@ class BudgetReportController extends Controller
// loop expenses.
foreach ($spent as $currency) {
foreach ($currency['budgets'] as $budget) {
foreach ($budget['transaction_journals'] as $journal) {
$title = sprintf('%s (%s)', $journal['source_account_name'], $currency['currency_name']);
$result[$title] = $result[$title] ?? [
@@ -282,5 +278,4 @@ class BudgetReportController extends Controller
return $return;
}
}