mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 09:22:33 +00:00
Various code fixes.
This commit is contained in:
@@ -190,7 +190,7 @@ class BoxController extends Controller
|
||||
$incomes[$currencyId] = app('amount')->formatAnything($currency, $incomes[$currencyId] ?? '0', false);
|
||||
$expenses[$currencyId] = app('amount')->formatAnything($currency, $expenses[$currencyId] ?? '0', false);
|
||||
}
|
||||
if (empty($sums)) {
|
||||
if (0 === count($sums)) {
|
||||
$currency = app('amount')->getDefaultCurrency();
|
||||
$sums[$currency->id] = app('amount')->formatAnything($currency, '0', false);
|
||||
$incomes[$currency->id] = app('amount')->formatAnything($currency, '0', false);
|
||||
|
@@ -68,7 +68,7 @@ class FrontpageController extends Controller
|
||||
}
|
||||
}
|
||||
$html = '';
|
||||
if (!empty($info)) {
|
||||
if (0 !== count($info)) {
|
||||
try {
|
||||
$html = view('json.piggy-banks', compact('info'))->render();
|
||||
} catch (Throwable $e) {
|
||||
|
@@ -43,13 +43,13 @@ class IntroController extends Controller
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function getIntroSteps(string $route, string $specificPage = null): JsonResponse
|
||||
public function getIntroSteps(string $route, string $specificPage = null): JsonResponse // @phpstan-ignore-line
|
||||
{
|
||||
Log::debug(sprintf('getIntroSteps for route "%s" and page "%s"', $route, $specificPage));
|
||||
$specificPage = $specificPage ?? '';
|
||||
$steps = $this->getBasicSteps($route);
|
||||
$specificSteps = $this->getSpecificSteps($route, $specificPage);
|
||||
if (empty($specificSteps)) {
|
||||
if (0 === count($specificSteps)) {
|
||||
Log::debug(sprintf('No specific steps for route "%s" and page "%s"', $route, $specificPage));
|
||||
|
||||
return response()->json($steps);
|
||||
@@ -104,7 +104,7 @@ class IntroController extends Controller
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function postEnable(string $route, string $specialPage = null): JsonResponse
|
||||
public function postEnable(string $route, string $specialPage = null): JsonResponse // @phpstan-ignore-line
|
||||
{
|
||||
$specialPage = $specialPage ?? '';
|
||||
$route = str_replace('.', '_', $route);
|
||||
@@ -128,7 +128,7 @@ class IntroController extends Controller
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function postFinished(string $route, string $specialPage = null): JsonResponse
|
||||
public function postFinished(string $route, string $specialPage = null): JsonResponse // @phpstan-ignore-line
|
||||
{
|
||||
$specialPage = $specialPage ?? '';
|
||||
$key = 'shown_demo_' . $route;
|
||||
|
@@ -85,7 +85,7 @@ class ReconcileController extends Controller
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function overview(Request $request, Account $account = null, Carbon $start = null, Carbon $end = null): JsonResponse
|
||||
public function overview(Request $request, Account $account = null, Carbon $start = null, Carbon $end = null): JsonResponse // @phpstan-ignore-line
|
||||
{
|
||||
$startBalance = $request->get('startBalance');
|
||||
$endBalance = $request->get('endBalance');
|
||||
@@ -226,7 +226,7 @@ class ReconcileController extends Controller
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function transactions(Account $account, Carbon $start = null, Carbon $end = null)
|
||||
public function transactions(Account $account, Carbon $start = null, Carbon $end = null) // @phpstan-ignore-line
|
||||
{
|
||||
if (null === $start || null === $end) {
|
||||
throw new FireflyException('Invalid dates submitted.');
|
||||
|
Reference in New Issue
Block a user