Code cleanup that (hopefully) matches style CI

This commit is contained in:
James Cole
2020-03-17 14:54:25 +01:00
parent e02e747f1b
commit b0c9fc0792
35 changed files with 980 additions and 959 deletions

View File

@@ -54,8 +54,8 @@ class DecryptDatabase extends Command
/**
* Execute the console command.
*
* @return int
* @throws FireflyException
* @return int
*/
public function handle(): int
{
@@ -96,7 +96,7 @@ class DecryptDatabase extends Command
Log::debug(sprintf('Decrypted field "%s" "%s" to "%s" in table "%s" (row #%d)', $field, $original, print_r($value, true), $table, $id));
/** @var Preference $object */
$object = Preference::find((int)$id);
$object = Preference::find((int) $id);
if (null !== $object) {
$object->data = $value;
$object->save();
@@ -131,7 +131,7 @@ class DecryptDatabase extends Command
$configName = sprintf('is_decrypted_%s', $table);
$configVar = app('fireflyconfig')->get($configName, false);
if (null !== $configVar) {
return (bool)$configVar->data;
return (bool) $configVar->data;
}
return false;
@@ -142,8 +142,9 @@ class DecryptDatabase extends Command
* Tries to decrypt data. Will only throw an exception when the MAC is invalid.
*
* @param $value
* @return string
*
* @throws FireflyException
* @return string
*/
private function tryDecrypt($value)
{