mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 02:57:45 +00:00
Various bug fixes and code cleanup.
This commit is contained in:
@@ -54,7 +54,7 @@ class FrontpageController extends Controller
|
||||
// percentage!
|
||||
$pct = 0;
|
||||
if (0 !== bccomp($piggyBank->targetamount, '0')) {
|
||||
$pct = round(($amount / $piggyBank->targetamount) * 100);
|
||||
$pct = (int)bcmul(bcdiv($amount, $piggyBank->targetamount), '100');
|
||||
}
|
||||
|
||||
$entry = [
|
||||
|
@@ -44,7 +44,7 @@ class IntroController extends Controller
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function getIntroSteps(string $route, string $specificPage = null): JsonResponse // @phpstan-ignore-line
|
||||
public function getIntroSteps(string $route, string $specificPage = null): JsonResponse
|
||||
{
|
||||
Log::debug(sprintf('getIntroSteps for route "%s" and page "%s"', $route, $specificPage));
|
||||
$specificPage = $specificPage ?? '';
|
||||
@@ -105,7 +105,7 @@ class IntroController extends Controller
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function postEnable(string $route, string $specialPage = null): JsonResponse // @phpstan-ignore-line
|
||||
public function postEnable(string $route, string $specialPage = null): JsonResponse
|
||||
{
|
||||
$specialPage = $specialPage ?? '';
|
||||
$route = str_replace('.', '_', $route);
|
||||
@@ -129,7 +129,7 @@ class IntroController extends Controller
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function postFinished(string $route, string $specialPage = null): JsonResponse // @phpstan-ignore-line
|
||||
public function postFinished(string $route, string $specialPage = null): JsonResponse
|
||||
{
|
||||
$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 // @phpstan-ignore-line
|
||||
public function overview(Request $request, Account $account = null, Carbon $start = null, Carbon $end = null): JsonResponse
|
||||
{
|
||||
$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) // @phpstan-ignore-line
|
||||
public function transactions(Account $account, Carbon $start = null, Carbon $end = null)
|
||||
{
|
||||
if (null === $start || null === $end) {
|
||||
throw new FireflyException('Invalid dates submitted.');
|
||||
|
Reference in New Issue
Block a user