Clean up various code.

This commit is contained in:
James Cole
2018-07-22 12:52:07 +02:00
parent d193a6aec4
commit d4ba014a8a
14 changed files with 171 additions and 95 deletions

View File

@@ -58,7 +58,7 @@ class FakePrerequisites implements PrerequisitesInterface
$apiKey = app('preferences')->getForUser($this->user, 'fake_api_key', null)->data;
}
$oldKey = (string)\request()->old('api_key');
if ($oldKey !== '') {
if ('' !== $oldKey) {
$apiKey = \request()->old('api_key'); // @codeCoverageIgnore
}
@@ -118,7 +118,7 @@ class FakePrerequisites implements PrerequisitesInterface
if (null === $apiKey->data) {
return false;
}
if (\strlen((string)$apiKey->data) === 32) {
if (32 === \strlen((string)$apiKey->data)) {
return true;
}