@@ -84,16 +84,16 @@ discard block |
||
| 84 | 84 | $this->db = $this->getDatabase(); |
| 85 | 85 | |
| 86 | 86 | $lang = $this->option('lang'); |
| 87 | - if (! empty($lang)) { |
|
| 87 | + if (!empty($lang)) { |
|
| 88 | 88 | $this->langs = explode(',', $lang); |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | $scopes = $this->scopes; |
| 92 | 92 | $scope = $this->option('scope'); |
| 93 | - if (! empty($scope)) { |
|
| 93 | + if (!empty($scope)) { |
|
| 94 | 94 | $scopes = explode(',', $scope); |
| 95 | 95 | foreach ($scopes as $scope) { |
| 96 | - if (! in_array($scope, $this->scopes)) { |
|
| 96 | + if (!in_array($scope, $this->scopes)) { |
|
| 97 | 97 | throw new InvalidArgumentException('Scope "' . $scope . '" is not found! Available scopes is ' . implode(', ', $this->scopes)); |
| 98 | 98 | } |
| 99 | 99 | } |
@@ -101,12 +101,12 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | $path = $this->option('path', 'storage/multilang'); |
| 103 | 103 | $this->path = base_path($path); |
| 104 | - if (! is_dir($this->path)) { |
|
| 105 | - if (! mkdir($this->path, 0777, true)) { |
|
| 104 | + if (!is_dir($this->path)) { |
|
| 105 | + if (!mkdir($this->path, 0777, true)) { |
|
| 106 | 106 | throw new InvalidArgumentException('unable to create the folder "' . $this->path . '"!'); |
| 107 | 107 | } |
| 108 | 108 | } |
| 109 | - if (! is_writable($this->path)) { |
|
| 109 | + if (!is_writable($this->path)) { |
|
| 110 | 110 | throw new InvalidArgumentException('Folder "' . $this->path . '" is not writable!'); |
| 111 | 111 | } |
| 112 | 112 | |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | { |
| 150 | 150 | $dbTexts = $this->getTextsFromDb($scope); |
| 151 | 151 | |
| 152 | - $fileTexts = ! $clear ? $this->getTextsFromFile($scope) : []; |
|
| 152 | + $fileTexts = !$clear ? $this->getTextsFromFile($scope) : []; |
|
| 153 | 153 | |
| 154 | 154 | $textsToWrite = $force ? array_replace_recursive($fileTexts, $dbTexts) : array_replace_recursive($dbTexts, $fileTexts); |
| 155 | 155 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | |
| 161 | 161 | $path = $this->path . '/' . $scope . '.yml'; |
| 162 | 162 | $written = file_put_contents($path, $yaml); |
| 163 | - if (! $written) { |
|
| 163 | + if (!$written) { |
|
| 164 | 164 | $this->error('Export texts of "' . $scope . '" is failed!'); |
| 165 | 165 | } |
| 166 | 166 | |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | foreach ($dbTexts as $text) { |
| 205 | 205 | $key = $text->key; |
| 206 | 206 | $lang = $text->lang; |
| 207 | - if (! isset($formattedDbTexts[$key])) { |
|
| 207 | + if (!isset($formattedDbTexts[$key])) { |
|
| 208 | 208 | $formattedDbTexts[$key] = ['key' => $key]; |
| 209 | 209 | } |
| 210 | 210 | $formattedDbTexts[$key]['texts'][$lang] = $text->value; |