Various code cleanup.

This commit is contained in:
James Cole
2025-10-05 12:57:58 +02:00
parent 072212c112
commit 6341743cf9
169 changed files with 482 additions and 305 deletions

View File

@@ -37,6 +37,8 @@ use Illuminate\Http\Request;
use Illuminate\Routing\Redirector;
use Illuminate\Support\Facades\Log;
use Illuminate\View\View;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class CreateController
@@ -131,9 +133,12 @@ class CreateController extends Controller
/**
* Store the new account.
*
* @param AccountFormRequest $request
*
* @return Redirector|RedirectResponse
*
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function store(AccountFormRequest $request)
{

View File

@@ -35,6 +35,8 @@ use Illuminate\Http\Request;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Facades\Log;
use Illuminate\View\View;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class IndexController
@@ -66,10 +68,14 @@ class IndexController extends Controller
}
/**
* @param Request $request
* @param string $objectType
*
* @return Factory|View
*
* @throws FireflyException
* */
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function inactive(Request $request, string $objectType)
{
$inactivePage = true;
@@ -136,10 +142,14 @@ class IndexController extends Controller
/**
* Show list of accounts.
*
* @param Request $request
* @param string $objectType
*
* @return Factory|View
*
* @throws FireflyException
* */
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function index(Request $request, string $objectType)
{
app('log')->debug(sprintf('Now at %s', __METHOD__));

View File

@@ -40,6 +40,8 @@ use Illuminate\Routing\Redirector;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\View\View;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
@@ -76,10 +78,17 @@ class ShowController extends Controller
/**
* Show an account.
*
* @param Request $request
* @param Account $account
* @param Carbon|null $start
* @param Carbon|null $end
*
* @return Factory|Redirector|RedirectResponse|View
*
* @throws ContainerExceptionInterface
* @throws FireflyException
* */
* @throws NotFoundExceptionInterface
*/
public function show(Request $request, Account $account, ?Carbon $start = null, ?Carbon $end = null)
{
if (0 === $account->id) {
@@ -193,10 +202,14 @@ class ShowController extends Controller
/**
* Show an account.
*
* @param Request $request
* @param Account $account
*
* @return Factory|Redirector|RedirectResponse|View
*
* @throws FireflyException
* */
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function showAll(Request $request, Account $account)
{
if (!$this->isEditableAccount($account)) {