@@ -78,18 +78,18 @@ discard block |
||
78 | 78 | |
79 | 79 | private function registerBindings() |
80 | 80 | { |
81 | - $this->app->bind(TranslationRepository::class, function () { |
|
81 | + $this->app->bind(TranslationRepository::class, function() { |
|
82 | 82 | $repository = new EloquentTranslationRepository(new Translation()); |
83 | 83 | |
84 | - if (! config('app.cache')) { |
|
84 | + if (!config('app.cache')) { |
|
85 | 85 | return $repository; |
86 | 86 | } |
87 | 87 | |
88 | 88 | return new CacheTranslationDecorator($repository); |
89 | 89 | }); |
90 | 90 | |
91 | - $this->app->bind(FileTranslationRepository::class, function ($app) { |
|
92 | - return new FileDiskTranslationRepository($app['files'], $app['translation.loader']); |
|
91 | + $this->app->bind(FileTranslationRepository::class, function($app) { |
|
92 | + return new FileDiskTranslationRepository($app[ 'files' ], $app[ 'translation.loader' ]); |
|
93 | 93 | }); |
94 | 94 | } |
95 | 95 | |
@@ -105,17 +105,17 @@ discard block |
||
105 | 105 | $this->app->offsetUnset('translation.loader'); |
106 | 106 | $this->app->offsetUnset('translator'); |
107 | 107 | |
108 | - $this->app->singleton('translation.loader', function ($app) { |
|
109 | - return new TranslationLoader($app['files'], $app['path.lang']); |
|
108 | + $this->app->singleton('translation.loader', function($app) { |
|
109 | + return new TranslationLoader($app[ 'files' ], $app[ 'path.lang' ]); |
|
110 | 110 | }); |
111 | - $this->app->singleton('translator', function ($app) { |
|
112 | - $loader = $app['translation.loader']; |
|
111 | + $this->app->singleton('translator', function($app) { |
|
112 | + $loader = $app[ 'translation.loader' ]; |
|
113 | 113 | |
114 | - $locale = $app['config']['app.locale']; |
|
114 | + $locale = $app[ 'config' ][ 'app.locale' ]; |
|
115 | 115 | |
116 | 116 | $trans = new Translator($loader, $locale); |
117 | 117 | |
118 | - $trans->setFallback($app['config']['app.fallback_locale']); |
|
118 | + $trans->setFallback($app[ 'config' ][ 'app.fallback_locale' ]); |
|
119 | 119 | |
120 | 120 | return $trans; |
121 | 121 | }); |
@@ -123,12 +123,12 @@ discard block |
||
123 | 123 | |
124 | 124 | private function registerValidators() |
125 | 125 | { |
126 | - Validator::extend('extensions', function ($attribute, $value, $parameters) { |
|
126 | + Validator::extend('extensions', function($attribute, $value, $parameters) { |
|
127 | 127 | return in_array($value->getClientOriginalExtension(), $parameters); |
128 | 128 | }); |
129 | 129 | |
130 | - Validator::replacer('extensions', function ($message, $attribute, $rule, $parameters) { |
|
131 | - return str_replace([':attribute', ':values'], [$attribute, implode(',', $parameters)], $message); |
|
130 | + Validator::replacer('extensions', function($message, $attribute, $rule, $parameters) { |
|
131 | + return str_replace([ ':attribute', ':values' ], [ $attribute, implode(',', $parameters) ], $message); |
|
132 | 132 | }); |
133 | 133 | } |
134 | 134 | } |