Various code cleanup.

This commit is contained in:
James Cole
2021-05-24 08:57:02 +02:00
parent d60650cff2
commit ad54163518
21 changed files with 157 additions and 164 deletions

View File

@@ -39,7 +39,7 @@ class CLIToken implements BinderInterface
* @param Route $route
*
* @return mixed
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
* @throws \FireflyIII\Exceptions\FireflyException
*/
public static function routeBinder(string $value, Route $route)
{
@@ -53,7 +53,7 @@ class CLIToken implements BinderInterface
}
foreach ($users as $user) {
$accessToken = app('preferences')->getForUser($user, 'access_token', null);
$accessToken = app('preferences')->getForUser($user, 'access_token');
if (null !== $accessToken && $accessToken->data === $value) {
Log::info(sprintf('Recognized user #%d (%s) from his acccess token.', $user->id, $user->email));