Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace Ahc\Cli;

use Ahc\Cli\Exception\InvalidArgumentException;
use Ahc\Cli\Helper\InflectsString;
use Ahc\Cli\Helper\OutputHelper;
use Ahc\Cli\Input\Command;
use Ahc\Cli\IO\Interactor;
Expand Down Expand Up @@ -46,7 +45,7 @@ class Application
public static $locale = 'en';

/**
* list of translations for each supported locale
* list of translations for each supported locale.
*
* @var array<string, array>
*
Expand Down
2 changes: 1 addition & 1 deletion src/Helper/OutputHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function printTrace(Throwable $e): void
$traceStr .= " <comment>$i)</end> <red>$symbol</end><comment>($args)</end>";
if ('' !== $trace['file']) {
$file = realpath($trace['file']);
$traceStr .= "<eol/> <yellow>" . t('at') . " $file</end><white>:{$trace['line']}</end><eol/>";
$traceStr .= '<eol/> <yellow>' . t('at') . " $file</end><white>:{$trace['line']}</end><eol/>";
}
}

Expand Down
10 changes: 5 additions & 5 deletions tests/ApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,9 @@ public function test_default_translations()
public function test_custom_translations(): void
{
Application::addLocale('fr', [
'Show version' => 'Afficher la version',
'%1$s [default: %2$s]' => '%1$s [par défaut: %2$s]',
'Command "%s" already added' => 'La commande "%s" a déjà été ajoutée'
'Show version' => 'Afficher la version',
'%1$s [default: %2$s]' => '%1$s [par défaut: %2$s]',
'Command "%s" already added' => 'La commande "%s" a déjà été ajoutée',
], true);

$this->assertSame('Afficher la version', t('Show version'));
Expand All @@ -355,8 +355,8 @@ public function test_app_translated()
{
$app = $this->newApp('test');
$app->addLocale('fr', [
'Show version' => 'Afficher la version',
'Verbosity level' => 'Niveau de verbocité',
'Show version' => 'Afficher la version',
'Verbosity level' => 'Niveau de verbocité',
'%1$s [default: %2$s]' => '%s [par défaut: %s]',
], true);
$app->command('rmdir');
Expand Down