Do some code cleanup and call correct phpunit.

This commit is contained in:
James Cole
2020-07-31 12:12:54 +02:00
parent c3110a43da
commit 4b96558433
48 changed files with 53 additions and 11 deletions

View File

@@ -47,6 +47,7 @@ class FixLongDescriptions extends Command
*/
protected $signature = 'firefly-iii:fix-long-descriptions';
/**
* Execute the console command.
*
@@ -68,7 +69,7 @@ class FixLongDescriptions extends Command
$groups = TransactionGroup::get(['id', 'title']);
/** @var TransactionGroup $group */
foreach ($groups as $group) {
if (strlen((string)$group->title) > self::MAX_LENGTH) {
if (strlen((string) $group->title) > self::MAX_LENGTH) {
$group->title = substr($group->title, 0, self::MAX_LENGTH);
$group->save();
$this->line(sprintf('Truncated description of transaction group #%d', $group->id));