mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 08:35:00 +00:00
Various PSR12 code cleanup
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AccountList.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
@@ -34,8 +35,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
class AccountList implements BinderInterface
|
||||
{
|
||||
/**
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
*
|
||||
* @return Collection
|
||||
* @throws NotFoundHttpException
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* BinderInterface.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
@@ -30,8 +31,8 @@ use Illuminate\Routing\Route;
|
||||
interface BinderInterface
|
||||
{
|
||||
/**
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* BudgetList.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
@@ -25,7 +26,6 @@ namespace FireflyIII\Support\Binder;
|
||||
use FireflyIII\Models\Budget;
|
||||
use Illuminate\Routing\Route;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
@@ -34,8 +34,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
class BudgetList implements BinderInterface
|
||||
{
|
||||
/**
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
*
|
||||
* @return Collection
|
||||
* @throws NotFoundHttpException
|
||||
|
@@ -35,8 +35,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
class CLIToken implements BinderInterface
|
||||
{
|
||||
/**
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
*
|
||||
* @return mixed
|
||||
* @throws FireflyException
|
||||
@@ -48,7 +48,7 @@ class CLIToken implements BinderInterface
|
||||
$users = $repository->all();
|
||||
|
||||
// check for static token
|
||||
if ($value === config('firefly.static_cron_token') && 32 === strlen((string) config('firefly.static_cron_token'))) {
|
||||
if ($value === config('firefly.static_cron_token') && 32 === strlen((string)config('firefly.static_cron_token'))) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* CategoryList.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
@@ -33,8 +34,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
class CategoryList implements BinderInterface
|
||||
{
|
||||
/**
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
*
|
||||
* @return Collection
|
||||
* @throws NotFoundHttpException
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* CurrencyCode.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
@@ -32,8 +33,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
class CurrencyCode implements BinderInterface
|
||||
{
|
||||
/**
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
*
|
||||
* @return TransactionCurrency
|
||||
* @throws NotFoundHttpException
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Date.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
@@ -35,8 +36,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
class Date implements BinderInterface
|
||||
{
|
||||
/**
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
*
|
||||
* @return Carbon
|
||||
* @throws NotFoundHttpException
|
||||
|
@@ -40,8 +40,8 @@ class DynamicConfigKey
|
||||
];
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
*
|
||||
* @return string
|
||||
* @throws NotFoundHttpException
|
||||
|
@@ -57,8 +57,8 @@ class EitherConfigKey
|
||||
];
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
*
|
||||
* @return string
|
||||
* @throws NotFoundHttpException
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* JournalList.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
@@ -33,8 +34,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
class JournalList implements BinderInterface
|
||||
{
|
||||
/**
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
@@ -62,7 +63,7 @@ class JournalList implements BinderInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
* @param string $value
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* TagList.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
@@ -35,8 +36,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
class TagList implements BinderInterface
|
||||
{
|
||||
/**
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
*
|
||||
* @return Collection
|
||||
* @throws NotFoundHttpException
|
||||
@@ -68,7 +69,7 @@ class TagList implements BinderInterface
|
||||
if (in_array(strtolower($tag->tag), $list, true)) {
|
||||
return true;
|
||||
}
|
||||
if (in_array((string) $tag->id, $list, true)) {
|
||||
if (in_array((string)$tag->id, $list, true)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* TagOrId.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
@@ -34,8 +35,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
class TagOrId implements BinderInterface
|
||||
{
|
||||
/**
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
*
|
||||
* @return Tag
|
||||
*/
|
||||
@@ -48,7 +49,7 @@ class TagOrId implements BinderInterface
|
||||
|
||||
$result = $repository->findByTag($value);
|
||||
if (null === $result) {
|
||||
$result = $repository->find((int) $value);
|
||||
$result = $repository->find((int)$value);
|
||||
}
|
||||
if (null !== $result) {
|
||||
return $result;
|
||||
|
Reference in New Issue
Block a user