Specify return types.

This commit is contained in:
James Cole
2018-07-08 12:28:42 +02:00
parent b315882f58
commit d05a1e0260
70 changed files with 254 additions and 229 deletions

View File

@@ -35,6 +35,7 @@ use FireflyIII\Repositories\Bill\BillRepositoryInterface;
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
use FireflyIII\Support\CacheProperties;
use Illuminate\Http\JsonResponse;
/**
* Class BoxController.
@@ -45,9 +46,9 @@ class BoxController extends Controller
/**
* @param BudgetRepositoryInterface $repository
*
* @return \Illuminate\Http\JsonResponse
* @return JsonResponse
*/
public function available(BudgetRepositoryInterface $repository)
public function available(BudgetRepositoryInterface $repository): JsonResponse
{
$start = session('start', Carbon::now()->startOfMonth());
$end = session('end', Carbon::now()->endOfMonth());
@@ -97,9 +98,9 @@ class BoxController extends Controller
/**
* @param CurrencyRepositoryInterface $repository
*
* @return \Illuminate\Http\JsonResponse
* @return JsonResponse
*/
public function balance(CurrencyRepositoryInterface $repository)
public function balance(CurrencyRepositoryInterface $repository): JsonResponse
{
// Cache result, return cache if present.
$start = session('start', Carbon::now()->startOfMonth());
@@ -179,9 +180,9 @@ class BoxController extends Controller
/**
* @param BillRepositoryInterface $repository
*
* @return \Illuminate\Http\JsonResponse
* @return JsonResponse
*/
public function bills(BillRepositoryInterface $repository)
public function bills(BillRepositoryInterface $repository): JsonResponse
{
$start = session('start', Carbon::now()->startOfMonth());
$end = session('end', Carbon::now()->endOfMonth());
@@ -217,9 +218,9 @@ class BoxController extends Controller
*
* @param CurrencyRepositoryInterface $currencyRepos
*
* @return \Illuminate\Http\JsonResponse
* @return JsonResponse
*/
public function netWorth(AccountRepositoryInterface $repository, CurrencyRepositoryInterface $currencyRepos)
public function netWorth(AccountRepositoryInterface $repository, CurrencyRepositoryInterface $currencyRepos): JsonResponse
{
$date = new Carbon(date('Y-m-d')); // needed so its per day.
/** @var Carbon $start */