Passed
Push — master ( cf04be...506301 )
by Fatih
10:28 queued 05:04
created
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                 'middleware' => 'web',
57 57
                 'namespace'  => $this->namespace,
58 58
             ],
59
-            function ($router) {
59
+            function($router) {
60 60
                 require base_path('routes/web.php');
61 61
             }
62 62
         );
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                 'namespace'  => $this->namespace,
78 78
                 'prefix'     => 'api',
79 79
             ],
80
-            function ($router) {
80
+            function($router) {
81 81
                 require base_path('routes/api.php');
82 82
             }
83 83
         );
Please login to merge, or discard this patch.
app/Providers/BroadcastServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
          */
23 23
         Broadcast::channel(
24 24
             'App.User.*',
25
-            function ($user, $userId) {
25
+            function($user, $userId) {
26 26
                 return (int)$user->id === (int)$userId;
27 27
             }
28 28
         );
Please login to merge, or discard this patch.
app/Exceptions/ExceptionHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,14 +106,14 @@
 block discarded – undo
106 106
                 ]
107 107
             );
108 108
         } catch (Throwable $e) {
109
-            return [];
109
+            return [ ];
110 110
         }
111 111
     }
112 112
 
113 113
     protected function unauthenticated($request, AuthenticationException $exception)
114 114
     {
115 115
         if ($request->expectsJson()) {
116
-            return response()->json(['error' => 'Unauthenticated.'], 401);
116
+            return response()->json([ 'error' => 'Unauthenticated.' ], 401);
117 117
         }
118 118
 
119 119
         if ($request->segment(1) === 'admin') {
Please login to merge, or discard this patch.
app/Listeners/Translations.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,24 +11,24 @@  discard block
 block discarded – undo
11 11
     {
12 12
         app()->singleton(
13 13
             'translation.loader',
14
-            function ($application) {
15
-                return new Loader($application['files'], $application['path.lang']);
14
+            function($application) {
15
+                return new Loader($application[ 'files' ], $application[ 'path.lang' ]);
16 16
             }
17 17
         );
18 18
 
19 19
         app()->singleton(
20 20
             'translator',
21
-            function ($application) {
21
+            function($application) {
22 22
                 $loader = $application->make('translation.loader');
23 23
 
24 24
                 // When registering the translator component, we'll need to set the default
25 25
                 // locale as well as the fallback locale. So, we'll grab the application
26 26
                 // configuration so we can easily get both of these values from there.
27
-                $locale = $application['config']['app.locale'];
27
+                $locale = $application[ 'config' ][ 'app.locale' ];
28 28
 
29 29
                 $trans = new Translator($loader, $locale);
30 30
 
31
-                $trans->setFallback($application['config']['app.fallback_locale']);
31
+                $trans->setFallback($application[ 'config' ][ 'app.fallback_locale' ]);
32 32
 
33 33
                 return $trans;
34 34
             }
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             config()->set('app.locale', LOCALE);
40 40
         }
41 41
         // Set our locale namespace.
42
-        app()->make('translator')->addNamespace('streams', realpath(__DIR__ . '/../../vendor/visiosoft/streams-platform/resources/lang'));
42
+        app()->make('translator')->addNamespace('streams', realpath(__DIR__.'/../../vendor/visiosoft/streams-platform/resources/lang'));
43 43
 
44 44
     }
45 45
 }
Please login to merge, or discard this patch.
app/Lang/Loader.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      *
22 22
      * @var array
23 23
      */
24
-    protected static $disabled = [];
24
+    protected static $disabled = [ ];
25 25
 
26 26
     /**
27 27
      * The streams path.
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
             foreach (config()->get('override_text') as $override) {
185 185
                 $override = explode(':', $override);
186 186
                 if (count($override) > 1) {
187
-                    $lines = $this->findArrayValue($override[0], $override[1], $lines);
187
+                    $lines = $this->findArrayValue($override[ 0 ], $override[ 1 ], $lines);
188 188
                 }
189 189
             }
190 190
         }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     {
197 197
         if (is_array($arr)) {
198 198
             foreach ($arr as $key => $item) {
199
-                $arr[$key] = $this->replaceNewValue($find_value, $new_value, $item);
199
+                $arr[ $key ] = $this->replaceNewValue($find_value, $new_value, $item);
200 200
             }
201 201
             return $arr;
202 202
         }
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
     function findArrayValue($find_value, $new_value, $arr)
210 210
     {
211 211
         foreach ($arr as $key => $item) {
212
-            $arr[$key] = $this->replaceNewValue($find_value, $new_value, $item);
212
+            $arr[ $key ] = $this->replaceNewValue($find_value, $new_value, $item);
213 213
         }
214 214
         return $arr;
215 215
     }
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
             $disabled = array_get(self::$disabled, $key = $addon->getNamespace('streams'), false);
231 231
 
232 232
             if (!$disabled && !$this->files->isDirectory($addon->getPath('resources/streams'))) {
233
-                self::$disabled[$key] = $disabled = true;
233
+                self::$disabled[ $key ] = $disabled = true;
234 234
             }
235 235
 
236 236
             if (!$disabled && (!$namespace || $namespace == 'streams')) {
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
             $disabled = array_get(self::$disabled, $key = $addon->getNamespace('addons'), false);
246 246
 
247 247
             if (!$disabled && !$this->files->isDirectory($addon->getPath('resources/addons'))) {
248
-                self::$disabled[$key] = $disabled = true;
248
+                self::$disabled[ $key ] = $disabled = true;
249 249
             }
250 250
 
251 251
             if (!$disabled && str_is('*.*.*', $namespace)) {
Please login to merge, or discard this patch.
app/Providers/AppServiceProvider.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,16 +14,16 @@
 block discarded – undo
14 14
      */
15 15
     public function boot()
16 16
     {
17
-	    view()->composer('*', function ($view) {
18
-	    	//Hidden menu items in sidebar on dashboard
19
-		    if (auth()->check() and template()->get('cp')){
20
-			    template()->get('cp')->getNavigation()->get('anomaly.module.variables')->setClass('hidden');
21
-			    template()->get('cp')->getNavigation()->get('anomaly.module.system')->setClass('hidden');
22
-			    template()->get('cp')->getNavigation()->get('anomaly.module.redirects')->setClass('hidden');
23
-			    template()->get('cp')->getNavigation()->get('anomaly.module.repeaters')->setClass('hidden');
24
-		    }
25
-		    //Auto Language Switcher
26
-		    if (config('advs.lang_switcher_for_browser') and is_null(Request()->session()->get('_locale')) and isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
17
+        view()->composer('*', function ($view) {
18
+            //Hidden menu items in sidebar on dashboard
19
+            if (auth()->check() and template()->get('cp')){
20
+                template()->get('cp')->getNavigation()->get('anomaly.module.variables')->setClass('hidden');
21
+                template()->get('cp')->getNavigation()->get('anomaly.module.system')->setClass('hidden');
22
+                template()->get('cp')->getNavigation()->get('anomaly.module.redirects')->setClass('hidden');
23
+                template()->get('cp')->getNavigation()->get('anomaly.module.repeaters')->setClass('hidden');
24
+            }
25
+            //Auto Language Switcher
26
+            if (config('advs.lang_switcher_for_browser') and is_null(Request()->session()->get('_locale')) and isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
27 27
                 $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);//Get Browser Language
28 28
                 $acceptLang = config('streams::locales.enabled'); //Supported Language
29 29
                 $lang = in_array($lang, $acceptLang) ? $lang : config('streams::locales.default', 'en');
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,17 +14,17 @@
 block discarded – undo
14 14
      */
15 15
     public function boot()
16 16
     {
17
-	    view()->composer('*', function ($view) {
17
+	    view()->composer('*', function($view) {
18 18
 	    	//Hidden menu items in sidebar on dashboard
19
-		    if (auth()->check() and template()->get('cp')){
19
+		    if (auth()->check() and template()->get('cp')) {
20 20
 			    template()->get('cp')->getNavigation()->get('anomaly.module.variables')->setClass('hidden');
21 21
 			    template()->get('cp')->getNavigation()->get('anomaly.module.system')->setClass('hidden');
22 22
 			    template()->get('cp')->getNavigation()->get('anomaly.module.redirects')->setClass('hidden');
23 23
 			    template()->get('cp')->getNavigation()->get('anomaly.module.repeaters')->setClass('hidden');
24 24
 		    }
25 25
 		    //Auto Language Switcher
26
-		    if (config('advs.lang_switcher_for_browser') and is_null(Request()->session()->get('_locale')) and isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
27
-                $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);//Get Browser Language
26
+		    if (config('advs.lang_switcher_for_browser') and is_null(Request()->session()->get('_locale')) and isset($_SERVER[ 'HTTP_ACCEPT_LANGUAGE' ])) {
27
+                $lang = substr($_SERVER[ 'HTTP_ACCEPT_LANGUAGE' ], 0, 2); //Get Browser Language
28 28
                 $acceptLang = config('streams::locales.enabled'); //Supported Language
29 29
                 $lang = in_array($lang, $acceptLang) ? $lang : config('streams::locales.default', 'en');
30 30
                 App()->setLocale($lang);
Please login to merge, or discard this patch.