mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
First part of a large code cleanup commit.
This commit is contained in:
@@ -51,7 +51,7 @@ class CLIToken implements BinderInterface
|
||||
|
||||
foreach ($users as $user) {
|
||||
$accessToken = app('preferences')->getForUser($user, 'access_token', null);
|
||||
if(null !== $accessToken && $accessToken->data === $value) {
|
||||
if (null !== $accessToken && $accessToken->data === $value) {
|
||||
Log::info(sprintf('Recognized user #%d (%s) from his acccess token.', $user->id, $user->email));
|
||||
|
||||
return $value;
|
||||
|
@@ -57,10 +57,10 @@ class TagList implements BinderInterface
|
||||
|
||||
$collection = $allTags->filter(
|
||||
function (Tag $tag) use ($list) {
|
||||
if(\in_array(strtolower($tag->tag), $list, true)) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
@@ -25,7 +25,6 @@ namespace FireflyIII\Support\Binder;
|
||||
use FireflyIII\Models\Tag;
|
||||
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
|
||||
use Illuminate\Routing\Route;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
@@ -38,8 +37,7 @@ class TagOrId implements BinderInterface
|
||||
* @param string $value
|
||||
* @param Route $route
|
||||
*
|
||||
* @return Collection
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
* @return Tag
|
||||
*/
|
||||
public static function routeBinder(string $value, Route $route): Tag
|
||||
{
|
||||
|
Reference in New Issue
Block a user