Skip to content
This repository was archived by the owner on Jun 18, 2019. It is now read-only.

Commit b1a615f

Browse files
committed
zONM2L
1 parent 6f0fc54 commit b1a615f

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/Translatable/Locales.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
namespace Dimsav\Translatable;
44

55
use ArrayAccess;
6+
use Illuminate\Contracts\Support\Arrayable;
67
use Dimsav\Translatable\Exception\LocalesNotDefinedException;
78
use Illuminate\Contracts\Config\Repository as ConfigContract;
8-
use Illuminate\Contracts\Support\Arrayable;
99
use Illuminate\Contracts\Translation\Translator as TranslatorContract;
1010

1111
class Locales implements Arrayable, ArrayAccess
@@ -92,7 +92,7 @@ public function getLocaleSeparator(): string
9292

9393
public function getCountryLocale(string $locale, string $country): string
9494
{
95-
return $locale . $this->getLocaleSeparator() . $country;
95+
return $locale.$this->getLocaleSeparator().$country;
9696
}
9797

9898
public function isLocaleCountryBased(string $locale): bool

src/Translatable/Translatable.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ private function getAttributeOrFallback($locale, $attribute)
204204
*/
205205
public function getAttribute($key)
206206
{
207-
list($attribute, $locale) = $this->getAttributeAndLocale($key);
207+
[$attribute, $locale] = $this->getAttributeAndLocale($key);
208208

209209
if ($this->isTranslationAttribute($attribute)) {
210210
if ($this->getTranslation($locale) === null) {
@@ -234,7 +234,7 @@ public function getAttribute($key)
234234
*/
235235
public function setAttribute($key, $value)
236236
{
237-
list($attribute, $locale) = $this->getAttributeAndLocale($key);
237+
[$attribute, $locale] = $this->getAttributeAndLocale($key);
238238

239239
if ($this->isTranslationAttribute($attribute)) {
240240
$this->getTranslationOrNew($locale)->$attribute = $value;
@@ -304,7 +304,7 @@ public function fill(array $attributes)
304304
$this->getTranslationOrNew($key)->fill($values);
305305
unset($attributes[$key]);
306306
} else {
307-
list($attribute, $locale) = $this->getAttributeAndLocale($key);
307+
[$attribute, $locale] = $this->getAttributeAndLocale($key);
308308
if ($this->isTranslationAttribute($attribute) and $this->isKeyALocale($locale)) {
309309
$this->getTranslationOrNew($locale)->fill([$attribute => $values]);
310310
unset($attributes[$key]);

src/Translatable/TranslatableServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ class TranslatableServiceProvider extends ServiceProvider
99
public function boot()
1010
{
1111
$this->publishes([
12-
__DIR__ . '/../config/translatable.php' => config_path('translatable.php'),
12+
__DIR__.'/../config/translatable.php' => config_path('translatable.php'),
1313
], 'translatable');
1414
}
1515

1616
public function register()
1717
{
1818
$this->mergeConfigFrom(
19-
__DIR__ . '/../config/translatable.php', 'translatable'
19+
__DIR__.'/../config/translatable.php', 'translatable'
2020
);
2121

2222
$this->registerTranslatableHelper();

0 commit comments

Comments
 (0)