mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix phpstan error courtesy of the laravel 11 upgrade (changed signatures and return types)
This commit is contained in:
@@ -82,7 +82,7 @@ class BillTransformer extends AbstractTransformer
|
||||
$payDatesFormatted = [];
|
||||
foreach ($paidData as $object) {
|
||||
$date = Carbon::createFromFormat('!Y-m-d', $object['date'], config('app.timezone'));
|
||||
if (false === $date) {
|
||||
if (null === $date) {
|
||||
$date = today(config('app.timezone'));
|
||||
}
|
||||
$object['date'] = $date->toAtomString();
|
||||
@@ -91,7 +91,7 @@ class BillTransformer extends AbstractTransformer
|
||||
|
||||
foreach ($payDates as $string) {
|
||||
$date = Carbon::createFromFormat('!Y-m-d', $string, config('app.timezone'));
|
||||
if (false === $date) {
|
||||
if (null === $date) {
|
||||
$date = today(config('app.timezone'));
|
||||
}
|
||||
$payDatesFormatted[] = $date->toAtomString();
|
||||
@@ -104,7 +104,7 @@ class BillTransformer extends AbstractTransformer
|
||||
|
||||
if (null !== $firstPayDate) {
|
||||
$nemDate = Carbon::createFromFormat('!Y-m-d', $firstPayDate, config('app.timezone'));
|
||||
if (false === $nemDate) {
|
||||
if (null === $nemDate) {
|
||||
$nemDate = today(config('app.timezone'));
|
||||
}
|
||||
$nem = $nemDate->toAtomString();
|
||||
@@ -129,7 +129,7 @@ class BillTransformer extends AbstractTransformer
|
||||
$current = $payDatesFormatted[0] ?? null;
|
||||
if (null !== $current && !$nemDate->isToday()) {
|
||||
$temp2 = Carbon::createFromFormat('Y-m-d\TH:i:sP', $current);
|
||||
if (false === $temp2) {
|
||||
if (null === $temp2) {
|
||||
$temp2 = today(config('app.timezone'));
|
||||
}
|
||||
$nemDiff = trans('firefly.bill_expected_date', ['date' => $temp2->diffForHumans(today(config('app.timezone')), CarbonInterface::DIFF_RELATIVE_TO_NOW)]);
|
||||
|
Reference in New Issue
Block a user