Various code cleanup.

This commit is contained in:
James Cole
2021-05-24 08:54:58 +02:00
parent 815fd5ff6b
commit d60650cff2
63 changed files with 134 additions and 88 deletions

View File

@@ -70,7 +70,7 @@ class CreateController extends Controller
*
* @param Request $request
*
* @return Application|Factory|View
* @return Factory|\Illuminate\Contracts\View\View
*/
public function create(Request $request)
{

View File

@@ -70,7 +70,7 @@ class EditController extends Controller
* @param Request $request
* @param Bill $bill
*
* @return Application|Factory|View
* @return Factory|\Illuminate\Contracts\View\View
*/
public function edit(Request $request, Bill $bill)
{

View File

@@ -116,7 +116,7 @@ class IndexController extends Controller
}
$current = $array['pay_dates'][0] ?? null;
if (null !== $current && !$nextExpectedMatch->isToday()) {
$currentExpectedMatch = Carbon::createFromFormat(Carbon::ATOM, $current);
$currentExpectedMatch = Carbon::createFromFormat('Y-m-d\TH:i:sP', $current);
$array['next_expected_match_diff'] = $currentExpectedMatch->diffForHumans(today(), Carbon::DIFF_RELATIVE_TO_NOW);
}
@@ -195,7 +195,7 @@ class IndexController extends Controller
$avg = bcdiv(bcadd((string)$bill['amount_min'], (string)$bill['amount_max']), '2');
Log::debug(sprintf('Amount per period for bill #%d "%s"', $bill['id'], $bill['name']));
Log::debug(sprintf(sprintf('Average is %s', $avg)));
Log::debug(sprintf('Average is %s', $avg));
// calculate amount per year:
$multiplies = [
'yearly' => '1',

View File

@@ -80,7 +80,6 @@ class ShowController extends Controller
* @param Bill $bill
*
* @return RedirectResponse|Redirector
* @throws FireflyException
*/
public function rescan(Request $request, Bill $bill)
{