mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-25 21:16:47 +00:00
Fix various phpstan issues.
This commit is contained in:
@@ -31,7 +31,6 @@ use FireflyIII\Models\ObjectGroup;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||
use FireflyIII\Support\Http\Api\ExchangeRateConverter;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -41,23 +40,12 @@ use Illuminate\Support\Facades\DB;
|
||||
*/
|
||||
class BillTransformer extends AbstractTransformer
|
||||
{
|
||||
private ExchangeRateConverter $converter;
|
||||
private array $currencies;
|
||||
private TransactionCurrency $default;
|
||||
private array $groups;
|
||||
private array $notes;
|
||||
private array $paidDates;
|
||||
private BillRepositoryInterface $repository;
|
||||
|
||||
/**
|
||||
* BillTransformer constructor.
|
||||
*
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->repository = app(BillRepositoryInterface::class);
|
||||
}
|
||||
private ExchangeRateConverter $converter;
|
||||
private array $currencies;
|
||||
private TransactionCurrency $default;
|
||||
private array $groups;
|
||||
private array $notes;
|
||||
private array $paidDates;
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
|
||||
@@ -116,19 +116,4 @@ class BudgetTransformer extends AbstractTransformer
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function beautify(array $array): array
|
||||
{
|
||||
$return = [];
|
||||
foreach ($array as $data) {
|
||||
$data['sum'] = number_format((float)$data['sum'], (int)$data['currency_decimal_places'], '.', '');
|
||||
$return[] = $data;
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user