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/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