I am changing some string concatenations to sprintf() routines because they are more readable and safer. [skip ci]

This commit is contained in:
James Cole
2016-11-03 21:54:07 +01:00
parent 7bc4c6d115
commit 1d15bc0b10
5 changed files with 14 additions and 15 deletions

View File

@@ -99,7 +99,7 @@ class UpgradeDatabase extends Command
} catch (QueryException $e) {
Log::error($e->getMessage());
$this->error('Firefly III could not find the "identifier" field in the "transactions" table.');
$this->error('This field is required for Firefly III version ' . config('firefly.version') . ' to run.');
$this->error(sprintf('This field is required for Firefly III version %s to run.', config('firefly.version')));
$this->error('Please run "php artisan migrate" to add this field to the table.');
$this->info('Then, run "php artisan firefly:upgrade-database" to try again.');
break 2;

View File

@@ -64,15 +64,14 @@ class UpgradeFireflyInstructions extends Command
}
if (is_null($text)) {
$this->line('Thank you for installing Firefly III, v' . $version);
$this->line(sprintf('Thank you for installing Firefly III, v%s', $version));
$this->info('There are no extra upgrade instructions.');
$this->line('Firefly III should be ready for use.');
} else {
$this->line('+------------------------------------------------------------------------------+');
$this->line('');
$this->line('Thank you for installing Firefly III, v' . $version);
$this->line(sprintf('Thank you for installing Firefly III, v%s', $version));
$this->info(wordwrap($text));
$this->line('');
$this->line('+------------------------------------------------------------------------------+');