Some code cleanup courtesy of phpstorm.

This commit is contained in:
James Cole 2015-12-28 07:55:09 +01:00
parent f81e7da8bb
commit 97727e2e3d
16 changed files with 66 additions and 13 deletions

View File

@ -17,7 +17,8 @@ class Date extends BasicConverter implements ConverterInterface
{
/**
* @return Carbon
* @return static
* @throws FireflyException
*/
public function convert()
{

View File

@ -56,7 +56,8 @@ class AccountController extends Controller
}
/**
* @param Account $account
* @param AccountRepositoryInterface $repository
* @param Account $account
*
* @return \Illuminate\View\View
*/

View File

@ -90,7 +90,8 @@ class AttachmentController extends Controller
}
/**
* @param Attachment $attachment
* @param Attachment $attachment
* @param AttachmentHelperInterface $helper
*/
public function download(Attachment $attachment, AttachmentHelperInterface $helper)
{

View File

@ -228,6 +228,11 @@ class AuthController extends Controller
return $domains;
}
/**
* @param $email
*
* @return bool
*/
protected function isBlockedDomain($email)
{
$parts = explode('@', $email);

View File

@ -77,6 +77,8 @@ class PasswordController extends Controller
return redirect()->back()->withErrors(['email' => trans($response)]);
}
abort(404);
return '';
}
}

View File

@ -132,7 +132,9 @@ class BudgetController extends Controller
}
/**
* @param BudgetRepositoryInterface $repository
* @param BudgetRepositoryInterface $repository
*
* @param AccountRepositoryInterface $accountRepository
*
* @return \Illuminate\View\View
*/

View File

@ -146,6 +146,8 @@ class CategoryController extends Controller
* @param CategoryRepositoryInterface $repository
* @param Category $category
*
* @param $date
*
* @return \Illuminate\View\View
*/
public function showWithDate(CategoryRepositoryInterface $repository, Category $category, $date)

View File

@ -43,6 +43,8 @@ class BudgetController extends Controller
* @param Carbon $end
* @param Collection $accounts
* @param Collection $budgets
*
* @return \Illuminate\Http\JsonResponse
*/
public function multiYear(BudgetRepositoryInterface $repository, $report_type, Carbon $start, Carbon $end, Collection $accounts, Collection $budgets)
{
@ -110,8 +112,9 @@ class BudgetController extends Controller
}
/**
* @param BudgetRepositoryInterface $repository
* @param Budget $budget
* @param BudgetRepositoryInterface $repository
* @param AccountRepositoryInterface $accountRepository
* @param Budget $budget
*
* @return \Symfony\Component\HttpFoundation\Response
*/
@ -205,7 +208,9 @@ class BudgetController extends Controller
/**
* Shows a budget list with spent/left/overspent.
*
* @param BudgetRepositoryInterface $repository
* @param BudgetRepositoryInterface $repository
*
* @param AccountRepositoryInterface $accountRepository
*
* @return \Symfony\Component\HttpFoundation\Response
*/

View File

@ -135,6 +135,8 @@ class CategoryController extends Controller
* @param Carbon $end
* @param Collection $accounts
* @param Collection $categories
*
* @return \Illuminate\Http\JsonResponse
*/
public function multiYear(CategoryRepositoryInterface $repository, $report_type, Carbon $start, Carbon $end, Collection $accounts, Collection $categories)
{
@ -248,6 +250,8 @@ class CategoryController extends Controller
* @param CategoryRepositoryInterface $repository
* @param Category $category
*
* @param $date
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function specificPeriod(CategoryRepositoryInterface $repository, Category $category, $date)

View File

@ -146,6 +146,8 @@ class CsvController extends Controller
*
* STEP ONE
*
* @param AccountRepositoryInterface $repository
*
* @return \Illuminate\View\View
*/
public function index(AccountRepositoryInterface $repository)

View File

@ -89,10 +89,11 @@ class JsonController extends Controller
}
/**
* @param BillRepositoryInterface $repository
* @param AccountRepositoryInterface $accountRepository
* @param BillRepositoryInterface $repository
*
* @return \Symfony\Component\HttpFoundation\Response
* @internal param AccountRepositoryInterface $accountRepository
*
*/
public function boxBillsUnpaid(BillRepositoryInterface $repository)
{
@ -114,7 +115,9 @@ class JsonController extends Controller
}
/**
* @param ReportQueryInterface $reportQuery
* @param ReportQueryInterface $reportQuery
*
* @param AccountRepositoryInterface $accountRepository
*
* @return \Symfony\Component\HttpFoundation\Response
*/
@ -141,7 +144,9 @@ class JsonController extends Controller
}
/**
* @param ReportQueryInterface $reportQuery
* @param ReportQueryInterface $reportQuery
*
* @param AccountRepositoryInterface $accountRepository
*
* @return \Symfony\Component\HttpFoundation\Response
*/

View File

@ -157,6 +157,14 @@ class ReportController extends Controller
);
}
/**
* @param $report_type
* @param $start
* @param $end
* @param $accounts
*
* @return View
*/
public function defaultMultiYear($report_type, $start, $end, $accounts)
{

View File

@ -292,6 +292,8 @@ class TransactionController extends Controller
* @param JournalFormRequest $request
* @param JournalRepositoryInterface $repository
*
* @param AttachmentHelperInterface $att
*
* @return \Illuminate\Http\RedirectResponse
*/
public function store(JournalFormRequest $request, JournalRepositoryInterface $repository, AttachmentHelperInterface $att)

View File

@ -399,11 +399,14 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
return $sum;
}
/**
* @param Category $category
* @param int $page
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
* @return mixed
*/
public function getJournalsInRange(Category $category, $page, Carbon $start, Carbon $end)
{
@ -424,6 +427,9 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
/**
* @param Category $category
*
* @param Carbon $start
* @param Carbon $end
*
* @return int
*/
public function countJournalsInRange(Category $category, Carbon $start, Carbon $end)

View File

@ -23,6 +23,9 @@ interface CategoryRepositoryInterface
/**
* @param Category $category
*
* @param Carbon $start
* @param Carbon $end
*
* @return int
*/
public function countJournalsInRange(Category $category, Carbon $start, Carbon $end);
@ -141,6 +144,9 @@ interface CategoryRepositoryInterface
* @param Category $category
* @param int $page
*
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
*/
public function getJournalsInRange(Category $category, $page, Carbon $start, Carbon $end);

View File

@ -76,10 +76,11 @@ class Steam
* Gets the balance for the given account during the whole range, using this format:
*
* [yyyy-mm-dd] => 123,2
*
* @param Account $account
* @param Carbon $start
* @param Carbon $end
*
* @return array
*/
public function balanceInRange(Account $account, Carbon $start, Carbon $end)
{