Skip to content

Commit

Permalink
Tackle the Style CI (#20)
Browse files Browse the repository at this point in the history
* Tackle the Style CI

* Fix LaravelTranslationFileHelper

---------

Co-authored-by: Tohid <[email protected]>
  • Loading branch information
tohidplus and tohidspeakap authored Mar 29, 2023
1 parent 5e30e3b commit e2fa3c6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/FileWatcher/Listener.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php


namespace Tohidplus\Translation\FileWatcher;

use ElementaryFramework\FireFS\Events\FileSystemEvent;
Expand All @@ -25,6 +24,7 @@ public function onAny(FileSystemEvent $event): bool
CLIPrinter::print("Error on [{$exception->getLine()}] - [{$exception->getFile()}]", CLIPrinter::FOREGROUND_WHITE, CLIPrinter::BACKGROUND_RED);
CLIPrinter::print($exception->getMessage());
}

return false;
}

Expand All @@ -51,7 +51,6 @@ public function onCreated(FileSystemEvent $event)
*/
public function onModified(FileSystemEvent $event)
{

}

/**
Expand Down
3 changes: 1 addition & 2 deletions src/LaravelTranslationFileHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

class LaravelTranslationFileHelper implements TranslationFileHelper
{

/**
* @return \Symfony\Component\Finder\SplFileInfo[]
*/
Expand All @@ -24,7 +23,7 @@ public function write(array $data)
if (!File::exists($this->destinationPath())) {
File::makeDirectory($this->destinationPath(), 0755, true, true);
}
File::put($this->destinationPath() . '/translations.json', json_encode($data));
File::put($this->destinationPath().'/translations.json', json_encode($data));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/LaravelVueTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private function setTranslations()
$nestedArray = $this->addArrayLevels(
$array,
[],
$file->getExtension() === 'json'
$file->getExtension() === 'json'
? json_decode(file_get_contents($file->getPathName()), true)
: require $file->getPathName()
);
Expand Down

0 comments on commit e2fa3c6

Please sign in to comment.