Skip to content

Commit

Permalink
Merge pull request #121 from adhocore/analysis-negvk5
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
adhocore authored Dec 4, 2024
2 parents 86be16e + 5f5cab8 commit ffba556
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
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

0 comments on commit ffba556

Please sign in to comment.