Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Nov 24, 2022
1 parent 1d3e836 commit 0d19ac0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/framework/src/Console/Concerns/ValidatingCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@

namespace Hyde\Console\Concerns;

use function array_keys;
use function array_values;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Str;
use LaravelZero\Framework\Commands\Command;
use RuntimeException;

use function array_keys;
use function array_values;
use function str_replace;
use function ucfirst;

Expand Down Expand Up @@ -71,12 +70,12 @@ public function askWithValidation(

protected function translate($name, string $error): string
{
return ($this->makeReplacements($name, Str::after($error, 'validation.'), $this->getTranslationLines()));
return $this->makeReplacements($name, Str::after($error, 'validation.'), $this->getTranslationLines());
}

protected function makeReplacements(string $name, string $line, array $replace): string
{
return str_replace(':attribute', $name, str_replace(array_keys($replace), array_values($replace), $line));
return str_replace(':attribute', $name, str_replace(array_keys($replace), array_values($replace), $line));
}

protected function getTranslationLines(): array
Expand Down

0 comments on commit 0d19ac0

Please sign in to comment.