chore: reformat code.

This commit is contained in:
James Cole
2023-06-21 12:34:58 +02:00
parent 8d87abde64
commit 3dcb35710b
799 changed files with 23319 additions and 22173 deletions

View File

@@ -52,8 +52,8 @@ class FrontpageChartGenerator
/**
* FrontpageChartGenerator constructor.
*
* @param Carbon $start
* @param Carbon $end
* @param Carbon $start
* @param Carbon $end
*/
public function __construct(Carbon $start, Carbon $end)
{
@@ -99,24 +99,8 @@ class FrontpageChartGenerator
}
/**
* @param array $currency
*/
private function addCurrency(array $currency): void
{
$currencyId = (int)$currency['currency_id'];
$this->currencies[$currencyId] = $this->currencies[$currencyId] ?? [
'currency_id' => $currencyId,
'currency_name' => $currency['currency_name'],
'currency_symbol' => $currency['currency_symbol'],
'currency_code' => $currency['currency_code'],
'currency_decimal_places' => $currency['currency_decimal_places'],
];
}
/**
* @param Category $category
* @param Collection $accounts
* @param Category $category
* @param Collection $accounts
*
* @return array
*/
@@ -138,7 +122,23 @@ class FrontpageChartGenerator
}
/**
* @param Collection $accounts
* @param array $currency
*/
private function addCurrency(array $currency): void
{
$currencyId = (int)$currency['currency_id'];
$this->currencies[$currencyId] = $this->currencies[$currencyId] ?? [
'currency_id' => $currencyId,
'currency_name' => $currency['currency_name'],
'currency_symbol' => $currency['currency_symbol'],
'currency_code' => $currency['currency_code'],
'currency_decimal_places' => $currency['currency_decimal_places'],
];
}
/**
* @param Collection $accounts
*
* @return array
*/
@@ -160,7 +160,7 @@ class FrontpageChartGenerator
}
/**
* @param array $data
* @param array $data
*
* @return array
*/
@@ -185,8 +185,8 @@ class FrontpageChartGenerator
}
/**
* @param array $currencyData
* @param array $monetaryData
* @param array $currencyData
* @param array $monetaryData
*
* @return array
*/

View File

@@ -36,9 +36,9 @@ use Illuminate\Support\Collection;
class WholePeriodChartGenerator
{
/**
* @param Category $category
* @param Carbon $start
* @param Carbon $end
* @param Category $category
* @param Carbon $start
* @param Carbon $end
*
* @return array
*/
@@ -117,8 +117,8 @@ class WholePeriodChartGenerator
/**
* TODO this method is duplicated
*
* @param Carbon $start
* @param Carbon $end
* @param Carbon $start
* @param Carbon $end
*
* @return string
*/
@@ -143,7 +143,7 @@ class WholePeriodChartGenerator
* Loop array of spent/earned info, and extract which currencies are present.
* Key is the currency ID.
*
* @param array $array
* @param array $array
*
* @return array
*/