We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -2,13 +2,11 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Backpack\LangFileManager\app\Http\Controllers; |
| 4 | 4 | |
| 5 | -use App\Http\Requests; |
|
| 6 | 5 | use Backpack\CRUD\app\Http\Controllers\CrudController; |
| 7 | -use Backpack\LangFileManager\app\Services\LangFiles; |
|
| 8 | 6 | use Backpack\LangFileManager\app\Models\Language; |
| 7 | +use Backpack\LangFileManager\app\Services\LangFiles; |
|
| 9 | 8 | use Illuminate\Http\Request; |
| 10 | 9 | // VALIDATION: change the requests to match your own file names if you need form validation |
| 11 | -use Backpack\LangFileManager\app\Http\Requests\LanguageRequest as StoreRequest; |
|
| 12 | 10 | use Backpack\LangFileManager\app\Http\Requests\LanguageRequest as UpdateRequest; |
| 13 | 11 | |
| 14 | 12 | class LanguageCrudController extends CrudController |
@@ -13,6 +13,9 @@ discard block |
||
| 13 | 13 | $this->lang = config('app.locale'); |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | + /** |
|
| 17 | + * @param string $lang |
|
| 18 | + */ |
|
| 16 | 19 | public function setLanguage($lang) |
| 17 | 20 | { |
| 18 | 21 | $this->lang = $lang; |
@@ -20,6 +23,9 @@ discard block |
||
| 20 | 23 | return $this; |
| 21 | 24 | } |
| 22 | 25 | |
| 26 | + /** |
|
| 27 | + * @param string $file |
|
| 28 | + */ |
|
| 23 | 29 | public function setFile($file) |
| 24 | 30 | { |
| 25 | 31 | $this->file = $file; |
@@ -187,7 +193,7 @@ discard block |
||
| 187 | 193 | * @param array $data the array that will be modified |
| 188 | 194 | * @param array $keys the keys (path) |
| 189 | 195 | * @param string $value the value to be added |
| 190 | - * @return array |
|
| 196 | + * @return string |
|
| 191 | 197 | */ |
| 192 | 198 | private function setArrayValue(&$data, $keys, $value) |
| 193 | 199 | { |
@@ -198,11 +204,17 @@ discard block |
||
| 198 | 204 | return $data = $value; |
| 199 | 205 | } |
| 200 | 206 | |
| 207 | + /** |
|
| 208 | + * @return string |
|
| 209 | + */ |
|
| 201 | 210 | private function getFilePath() |
| 202 | 211 | { |
| 203 | 212 | return base_path("resources/lang/{$this->lang}/{$this->file}.php"); |
| 204 | 213 | } |
| 205 | 214 | |
| 215 | + /** |
|
| 216 | + * @return string |
|
| 217 | + */ |
|
| 206 | 218 | private function getLangPath() |
| 207 | 219 | { |
| 208 | 220 | return base_path("resources/lang/{$this->lang}/"); |