Passed
Push — master ( cf04be...506301 )
by Fatih
10:28 queued 05:04
created
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.