Skip to content

Commit

Permalink
🧹 Fixed code-style
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Feb 21, 2024
1 parent 2006ec6 commit e62d571
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/Processors/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public function __construct(
readonly protected Config $config,
protected Manager $filesystem = new Manager(),
protected ArrHelper $arr = new ArrHelper(),
protected Translation $translation = new Translation()
) {
}
protected Translation $translation = new Translation(
)
) {}

public function prepare(): self
{
Expand Down Expand Up @@ -91,7 +91,7 @@ public function store(): void
$path = $this->config->langPath($filename);

$values
= $this->reset || !File::exists($path)
= $this->reset || ! File::exists($path)
? $values
: $this->arr->merge(
$this->filesystem->load($path),
Expand Down Expand Up @@ -121,7 +121,7 @@ protected function collectLocalizations(string $directory): void
$locale_alias = $this->toAlias($locale);

foreach ($this->file_types as $type) {
$main_path = $this->localeFilename($locale_alias, "$directory/locales/$locale/$type.json");
$main_path = $this->localeFilename($locale_alias, "$directory/locales/$locale/$type.json");
$inline_path = $this->localeFilename($locale_alias, "$directory/locales/$locale/$type.json", true);

$values = $this->filesystem->load($main_path);
Expand Down
7 changes: 3 additions & 4 deletions src/Resources/Translation.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ class Translation implements Arrayable

public function __construct(
readonly protected Arr $arr = new Arr()
) {
}
) {}

public function setSource(string $namespace, string $filename, array $values): self
{
Expand All @@ -54,12 +53,12 @@ public function toArray(): array
$result = [];

foreach (array_keys($this->source) as $namespace) {
if (!isset($this->source[$namespace])) {
if (! isset($this->source[$namespace])) {
continue;
}

foreach ($this->source[$namespace] as $filename => $keys) {
if (!isset($this->translations[$namespace])) {
if (! isset($this->translations[$namespace])) {
continue;
}

Expand Down

0 comments on commit e62d571

Please sign in to comment.