Update packages.

This commit is contained in:
James Cole
2022-03-30 20:09:19 +02:00
parent 1211a5c878
commit 3120e29940
14 changed files with 68 additions and 59 deletions

View File

@@ -71,6 +71,8 @@ class AccountController extends Controller
*
* @return JsonResponse
* @throws JsonException
* @throws FireflyException
* @throws FireflyException
*/
public function accounts(AutocompleteRequest $request): JsonResponse
{

View File

@@ -35,6 +35,9 @@ use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
use FireflyIII\Support\Http\Api\ApiSupport;
use FireflyIII\User;
use Illuminate\Http\JsonResponse;
use JsonException;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class AccountController
@@ -77,9 +80,9 @@ class AccountController extends Controller
*
* @return JsonResponse
* @throws FireflyException
* @throws \JsonException
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
* @throws JsonException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function overview(DateRequest $request): JsonResponse
{

View File

@@ -34,6 +34,8 @@ use Illuminate\Routing\Controller as BaseController;
use League\Fractal\Manager;
use League\Fractal\Serializer\JsonApiSerializer;
use Log;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Symfony\Component\HttpFoundation\ParameterBag;
/**
@@ -74,8 +76,8 @@ abstract class Controller extends BaseController
* Method to grab all parameters from the URI.
*
* @return ParameterBag
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function getParameters(): ParameterBag
{
@@ -96,7 +98,7 @@ abstract class Controller extends BaseController
$obj = Carbon::parse($date);
} catch (InvalidDateException | InvalidFormatException $e) {
// don't care
Log::warning(sprintf('Ignored invalid date "%s" in API controller parameter check: %s', (string) $date, $e->getMessage()));
Log::warning(sprintf('Ignored invalid date "%s" in API controller parameter check: %s', $date, $e->getMessage()));
}
}
$bag->set($field, $obj);

View File

@@ -33,6 +33,7 @@ use FireflyIII\Support\Http\Api\TransactionFilter;
use FireflyIII\Transformers\CurrencyTransformer;
use Illuminate\Http\JsonResponse;
use Illuminate\Pagination\LengthAwarePaginator;
use JsonException;
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
use League\Fractal\Resource\Collection as FractalCollection;
use League\Fractal\Resource\Item;
@@ -72,7 +73,7 @@ class ShowController extends Controller
*
* @return JsonResponse
* @throws FireflyException
* @throws \JsonException
* @throws JsonException
* @codeCoverageIgnore
*/
public function index(): JsonResponse
@@ -108,7 +109,7 @@ class ShowController extends Controller
*
* @return JsonResponse
* @throws FireflyException
* @throws \JsonException
* @throws JsonException
* @codeCoverageIgnore
*/
public function show(TransactionCurrency $currency): JsonResponse
@@ -134,7 +135,7 @@ class ShowController extends Controller
*
* @return JsonResponse
* @throws FireflyException
* @throws \JsonException
* @throws JsonException
* @codeCoverageIgnore
*/
public function showDefault(): JsonResponse

View File

@@ -33,6 +33,7 @@ use FireflyIII\Support\Http\Api\AccountFilter;
use FireflyIII\Support\Http\Api\TransactionFilter;
use FireflyIII\Transformers\CurrencyTransformer;
use Illuminate\Http\JsonResponse;
use JsonException;
use League\Fractal\Resource\Item;
/**
@@ -74,7 +75,7 @@ class StoreController extends Controller
*
* @return JsonResponse
* @throws FireflyException
* @throws \JsonException
* @throws JsonException
*/
public function store(StoreRequest $request): JsonResponse
{

View File

@@ -364,7 +364,7 @@ class BasicController extends Controller
function (Account $account) {
$includeNetWorth = $this->accountRepository->getMetaValue($account, 'include_net_worth');
return null === $includeNetWorth ? true : '1' === $includeNetWorth;
return null === $includeNetWorth || '1' === $includeNetWorth;
}
);

View File

@@ -30,6 +30,8 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\Support\Binder\EitherConfigKey;
use Illuminate\Http\JsonResponse;
use Log;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class ConfigurationController
@@ -94,8 +96,8 @@ class ConfigurationController extends Controller
*
* @return array
* @throws FireflyException
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function getDynamicConfiguration(): array
{

View File

@@ -81,7 +81,7 @@ class UserController extends Controller
return response()->json([], 500);
}
if ($admin->id !== $user->id && $this->repository->hasRole($admin, 'owner')) {
if ($this->repository->hasRole($admin, 'owner')) {
$this->repository->destroy($user);
return response()->json([], 204);

View File

@@ -128,7 +128,7 @@ class GenericRequest extends FormRequest
foreach ($array as $billId) {
$billId = (int) $billId;
$bill = $repository->find($billId);
if (null !== $billId) {
if (null !== $bill) {
$this->bills->push($bill);
}
}
@@ -160,7 +160,7 @@ class GenericRequest extends FormRequest
foreach ($array as $budgetId) {
$budgetId = (int) $budgetId;
$budget = $repository->find($budgetId);
if (null !== $budgetId) {
if (null !== $budget) {
$this->budgets->push($budget);
}
}
@@ -192,7 +192,7 @@ class GenericRequest extends FormRequest
foreach ($array as $categoryId) {
$categoryId = (int) $categoryId;
$category = $repository->find($categoryId);
if (null !== $categoryId) {
if (null !== $category) {
$this->categories->push($category);
}
}
@@ -282,7 +282,7 @@ class GenericRequest extends FormRequest
foreach ($array as $tagId) {
$tagId = (int) $tagId;
$tag = $repository->find($tagId);
if (null !== $tagId) {
if (null !== $tag) {
$this->tags->push($tag);
}
}