Reformat various code.

This commit is contained in:
James Cole
2022-03-29 15:10:05 +02:00
parent 60786461a9
commit 123693096c
134 changed files with 336 additions and 141 deletions

View File

@@ -53,7 +53,6 @@ class AccountTransformer extends AbstractTransformer
* @param Account $account
*
* @return array
* @throws FireflyException
* @throws JsonException
*/
public function transform(Account $account): array
@@ -171,6 +170,8 @@ class AccountTransformer extends AbstractTransformer
* @param Account $account
*
* @return array
* @throws FireflyException
* @throws JsonException
*/
private function getCurrency(Account $account): array
{

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Transformers;
use Carbon\Carbon;
use Carbon\CarbonInterface;
use FireflyIII\Models\Bill;
use FireflyIII\Models\ObjectGroup;
use FireflyIII\Models\TransactionJournal;
@@ -101,7 +102,7 @@ class BillTransformer extends AbstractTransformer
$current = $payDatesFormatted[0] ?? null;
if (null !== $current && !$temp->isToday()) {
$temp2 = Carbon::createFromFormat('Y-m-d\TH:i:sP', $current);
$nextExpectedMatchDiff = $temp2->diffForHumans(today(), Carbon::DIFF_RELATIVE_TO_NOW);
$nextExpectedMatchDiff = $temp2->diffForHumans(today(), CarbonInterface::DIFF_RELATIVE_TO_NOW);
}
unset($temp, $temp2);

View File

@@ -55,6 +55,8 @@ class PiggyBankEventTransformer extends AbstractTransformer
* @param PiggyBankEvent $event
*
* @return array
* @throws \FireflyIII\Exceptions\FireflyException
* @throws \JsonException
*/
public function transform(PiggyBankEvent $event): array
{

View File

@@ -56,6 +56,8 @@ class PiggyBankTransformer extends AbstractTransformer
* @param PiggyBank $piggyBank
*
* @return array
* @throws \FireflyIII\Exceptions\FireflyException
* @throws \JsonException
*/
public function transform(PiggyBank $piggyBank): array
{