mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 12:12:18 +00:00
Pick up some phpmd things
This commit is contained in:
@@ -162,6 +162,11 @@ class RemoteUserGuard implements Guard
|
|||||||
app('log')->error(sprintf('Did not set user at %s', __METHOD__));
|
app('log')->error(sprintf('Did not set user at %s', __METHOD__));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws FireflyException
|
||||||
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||||
|
*/
|
||||||
public function validate(array $credentials = []): bool
|
public function validate(array $credentials = []): bool
|
||||||
{
|
{
|
||||||
app('log')->debug(sprintf('Now at %s', __METHOD__));
|
app('log')->debug(sprintf('Now at %s', __METHOD__));
|
||||||
|
@@ -38,6 +38,8 @@ class RemoteUserProvider implements UserProvider
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||||
*/
|
*/
|
||||||
public function retrieveByCredentials(array $credentials): null|Authenticatable
|
public function retrieveByCredentials(array $credentials): null|Authenticatable
|
||||||
{
|
{
|
||||||
@@ -83,6 +85,8 @@ class RemoteUserProvider implements UserProvider
|
|||||||
* @param mixed $token
|
* @param mixed $token
|
||||||
*
|
*
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||||
*/
|
*/
|
||||||
public function retrieveByToken($identifier, $token): null|Authenticatable
|
public function retrieveByToken($identifier, $token): null|Authenticatable
|
||||||
{
|
{
|
||||||
@@ -91,6 +95,13 @@ class RemoteUserProvider implements UserProvider
|
|||||||
throw new FireflyException(sprintf('A) Did not implement %s', __METHOD__));
|
throw new FireflyException(sprintf('A) Did not implement %s', __METHOD__));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||||
|
*
|
||||||
|
* @param mixed $token
|
||||||
|
*
|
||||||
|
* @throws FireflyException
|
||||||
|
*/
|
||||||
public function updateRememberToken(Authenticatable $user, $token): void
|
public function updateRememberToken(Authenticatable $user, $token): void
|
||||||
{
|
{
|
||||||
app('log')->debug(sprintf('Now at %s', __METHOD__));
|
app('log')->debug(sprintf('Now at %s', __METHOD__));
|
||||||
@@ -100,6 +111,8 @@ class RemoteUserProvider implements UserProvider
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||||
*/
|
*/
|
||||||
public function validateCredentials(Authenticatable $user, array $credentials): bool
|
public function validateCredentials(Authenticatable $user, array $credentials): bool
|
||||||
{
|
{
|
||||||
|
@@ -143,6 +143,9 @@ class ExportDataGenerator
|
|||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||||
|
*/
|
||||||
public function get(string $key, mixed $default = null): mixed
|
public function get(string $key, mixed $default = null): mixed
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
@@ -153,6 +156,9 @@ class ExportDataGenerator
|
|||||||
$this->accounts = $accounts;
|
$this->accounts = $accounts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||||
|
*/
|
||||||
public function has(mixed $key): mixed
|
public function has(mixed $key): mixed
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
|
@@ -70,7 +70,7 @@ class AppendNotesToDescription implements ActionInterface
|
|||||||
// only append if there is something to append
|
// only append if there is something to append
|
||||||
if ('' !== $note->text) {
|
if ('' !== $note->text) {
|
||||||
$before = $object->description;
|
$before = $object->description;
|
||||||
$object->description = trim(sprintf('%s %s', $object->description, (string)$this->clearString($note->text)));
|
$object->description = trim(sprintf('%s %s', $object->description, (string) $this->clearString($note->text)));
|
||||||
$object->save();
|
$object->save();
|
||||||
app('log')->debug(sprintf('Journal description is updated to "%s".', $object->description));
|
app('log')->debug(sprintf('Journal description is updated to "%s".', $object->description));
|
||||||
|
|
||||||
@@ -83,11 +83,17 @@ class AppendNotesToDescription implements ActionInterface
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||||
|
*/
|
||||||
public function get(string $key, mixed $default = null): mixed
|
public function get(string $key, mixed $default = null): mixed
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||||
|
*/
|
||||||
public function has(mixed $key): mixed
|
public function has(mixed $key): mixed
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
|
@@ -77,7 +77,7 @@ class MoveNotesToDescription implements ActionInterface
|
|||||||
}
|
}
|
||||||
$before = $object->description;
|
$before = $object->description;
|
||||||
$beforeNote = $note->text;
|
$beforeNote = $note->text;
|
||||||
$object->description = (string)$this->clearString($note->text);
|
$object->description = (string) $this->clearString($note->text);
|
||||||
$object->save();
|
$object->save();
|
||||||
$note->delete();
|
$note->delete();
|
||||||
|
|
||||||
@@ -87,11 +87,17 @@ class MoveNotesToDescription implements ActionInterface
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||||
|
*/
|
||||||
public function get(string $key, mixed $default = null): mixed
|
public function get(string $key, mixed $default = null): mixed
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||||
|
*/
|
||||||
public function has(mixed $key): mixed
|
public function has(mixed $key): mixed
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
|
Reference in New Issue
Block a user