@@ -81,11 +81,11 @@ |
||
81 | 81 | $model->setAttribute('locale_group', Str::random()); |
82 | 82 | } |
83 | 83 | |
84 | - if (Schema::hasColumn($model->getTable(), 'language_code') && empty($model->language_code)){ |
|
84 | + if (Schema::hasColumn($model->getTable(), 'language_code') && empty($model->language_code)) { |
|
85 | 85 | $model->language_code = Translation::getLanguageCode(); |
86 | 86 | } |
87 | 87 | |
88 | - if (Schema::hasColumn($model->getTable(), 'country_code') && empty($model->country_code)){ |
|
88 | + if (Schema::hasColumn($model->getTable(), 'country_code') && empty($model->country_code)) { |
|
89 | 89 | $model->language_code = Translation::getCountryCode(); |
90 | 90 | } |
91 | 91 |
@@ -859,7 +859,7 @@ |
||
859 | 859 | |
860 | 860 | $response .= '</div> |
861 | 861 | </li>'; |
862 | - return $response; |
|
862 | + return $response; |
|
863 | 863 | } |
864 | 864 | |
865 | 865 | /** |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | try { |
239 | 239 | return app()->getLocale(); |
240 | 240 | } catch (Exception $e) { |
241 | - if($this->request->request->has('locale')) { |
|
241 | + if ($this->request->request->has('locale')) { |
|
242 | 242 | return strtolower($this->request->input('locale')); |
243 | 243 | } |
244 | 244 | if ($this->request->hasHeader('locale')) { |
@@ -765,7 +765,7 @@ discard block |
||
765 | 765 | { |
766 | 766 | $actual = $this->getActualLanguage(); |
767 | 767 | $languages = $this->getAllLanguages(); |
768 | - if (empty($languages) || count($languages)<=1) { |
|
768 | + if (empty($languages) || count($languages) <= 1) { |
|
769 | 769 | return ''; |
770 | 770 | } |
771 | 771 |
@@ -109,7 +109,7 @@ |
||
109 | 109 | */ |
110 | 110 | protected function pathFromParsedUrl($parsedUrl) |
111 | 111 | { |
112 | - $path = '/' . implode('/', $parsedUrl['segments']); |
|
112 | + $path = '/'.implode('/', $parsedUrl['segments']); |
|
113 | 113 | if ($parsedUrl['query']) { |
114 | 114 | $path .= "?{$parsedUrl['query']}"; |
115 | 115 | } |
@@ -56,15 +56,15 @@ discard block |
||
56 | 56 | 'client' => 'webapp', |
57 | 57 | 'hl' => 'en', |
58 | 58 | 'dt' => [ |
59 | - 't', // Translate |
|
60 | - 'bd', // Full translate with synonym ($bodyArray[1]) |
|
61 | - 'at', // Other translate ($bodyArray[5] - in google translate page this shows when click on translated word) |
|
62 | - 'ex', // Example part ($bodyArray[13]) |
|
63 | - 'ld', // I don't know ($bodyArray[8]) |
|
64 | - 'md', // Definition part with example ($bodyArray[12]) |
|
59 | + 't', // Translate |
|
60 | + 'bd', // Full translate with synonym ($bodyArray[1]) |
|
61 | + 'at', // Other translate ($bodyArray[5] - in google translate page this shows when click on translated word) |
|
62 | + 'ex', // Example part ($bodyArray[13]) |
|
63 | + 'ld', // I don't know ($bodyArray[8]) |
|
64 | + 'md', // Definition part with example ($bodyArray[12]) |
|
65 | 65 | 'qca', // I don't know ($bodyArray[8]) |
66 | - 'rw', // Read also part ($bodyArray[14]) |
|
67 | - 'rm', // I don't know |
|
66 | + 'rw', // Read also part ($bodyArray[14]) |
|
67 | + 'rm', // I don't know |
|
68 | 68 | 'ss' // Full synonym ($bodyArray[11]) |
69 | 69 | ], |
70 | 70 | 'sl' => null, // Source language |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | } else { |
271 | 271 | if (is_array($responseArray[0])) { |
272 | 272 | return (string) array_reduce( |
273 | - $responseArray[0], function ($carry, $item) { |
|
273 | + $responseArray[0], function($carry, $item) { |
|
274 | 274 | $carry .= $item[0]; |
275 | 275 | return $carry; |
276 | 276 | } |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | |
289 | 289 | $this->model->setRelation( |
290 | 290 | 'translations', $translations->filter( |
291 | - function ($translation) use ($key, $locale) { |
|
291 | + function($translation) use ($key, $locale) { |
|
292 | 292 | return $translation->column_name != $key && $translation->locale != $locale; |
293 | 293 | } |
294 | 294 | ) |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | public function jsonSerialize() |
330 | 330 | { |
331 | 331 | return array_map( |
332 | - function ($array) { |
|
332 | + function($array) { |
|
333 | 333 | return $array['value']; |
334 | 334 | }, $this->getRawAttributes() |
335 | 335 | ); |
@@ -20,8 +20,7 @@ |
||
20 | 20 | // THIS WILL NOW RETURN YOUR NEW SERVICE PROVIDER SINCE YOU'RE |
21 | 21 | // IN THE MyLib\Validation NAMESPACE |
22 | 22 | return new Validator($this->translator, $data, $rules, $messages); |
23 | - } |
|
24 | - else |
|
23 | + } else |
|
25 | 24 | { |
26 | 25 | return call_user_func($this->resolver, $this->translator, $data, $rules, $messages); |
27 | 26 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $class = $this->model; // Must be a local var to test |
90 | 90 | |
91 | 91 | // There aren't multiple locales specified |
92 | - if (count(\Illuminate\Support\Facades\Config::get('site.site.locales')) <= 1 ) { return true; |
|
92 | + if (count(\Illuminate\Support\Facades\Config::get('site.site.locales')) <= 1) { return true; |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | // We're editing a model with no locale attribute |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | } |
98 | 98 | |
99 | 99 | // The model was explicitly disabled |
100 | - if (!property_exists($class, 'localizable') || $class::$localizable === false ) { |
|
100 | + if (!property_exists($class, 'localizable') || $class::$localizable === false) { |
|
101 | 101 | return true; |
102 | 102 | } |
103 | 103 |