Passed
Push — master ( ed9e0d...77c88c )
by Georgi
02:57
created
src/Providers/EpesiServiceProvider.php 1 patch
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -10,58 +10,58 @@
 block discarded – undo
10 10
 
11 11
 class EpesiServiceProvider extends ServiceProvider
12 12
 {
13
-    /**
14
-     * Booting the package.
15
-     */
16
-    public function boot()
17
-    {
18
-    	$this->ensureHttps();
13
+	/**
14
+	 * Booting the package.
15
+	 */
16
+	public function boot()
17
+	{
18
+		$this->ensureHttps();
19 19
     	
20
-    	Route::group(['namespace' => 'Epesi\Core\Controllers', 'middleware' => 'web'], function() {
21
-    		Route::any('/', 'SystemController@index');
22
-    		Route::get('logo', 'SystemController@logo');
23
-    		Route::any('install', 'SystemController@install');
20
+		Route::group(['namespace' => 'Epesi\Core\Controllers', 'middleware' => 'web'], function() {
21
+			Route::any('/', 'SystemController@index');
22
+			Route::get('logo', 'SystemController@logo');
23
+			Route::any('install', 'SystemController@install');
24 24
     		
25
-    		Route::group(['middleware' => ['auth', NoCacheHeaders::class]], function() {
26
-    			Route::any('home', 'SystemController@home')->name('home');
25
+			Route::group(['middleware' => ['auth', NoCacheHeaders::class]], function() {
26
+				Route::any('home', 'SystemController@home')->name('home');
27 27
     			
28
-    			Route::any('view/{alias}/{method?}/{args?}', 'ModuleController@view');
29
-    		});
30
-    	});
28
+				Route::any('view/{alias}/{method?}/{args?}', 'ModuleController@view');
29
+			});
30
+		});
31 31
 
32
-    	// call boot methods on all modules
33
-    	ModuleManager::call('boot');
32
+		// call boot methods on all modules
33
+		ModuleManager::call('boot');
34 34
     		
35 35
 		foreach (ModuleManager::collect('translations') as $path) {
36 36
 			$this->loadJsonTranslationsFrom($path);
37 37
 		}
38 38
 		
39
-    	// Register admin service provider if in admin mode or in console
40
-    	// TODO: apply access restriction to admin mode
39
+		// Register admin service provider if in admin mode or in console
40
+		// TODO: apply access restriction to admin mode
41 41
 //     	if ($this->app->runningInConsole() || (request('admin', false) && Auth::user()->can('modify system'))) {
42
-    	if ($this->app->runningInConsole() || request('admin', false)) {
43
-    		$this->app->register(AdminServiceProvider::class);
44
-    	}
45
-    }
42
+		if ($this->app->runningInConsole() || request('admin', false)) {
43
+			$this->app->register(AdminServiceProvider::class);
44
+		}
45
+	}
46 46
 
47
-    /**
48
-     * Register the provider.
49
-     */
50
-    public function register()
51
-    {
52
-    	$this->app->singleton(App::class);
53
-    }
47
+	/**
48
+	 * Register the provider.
49
+	 */
50
+	public function register()
51
+	{
52
+		$this->app->singleton(App::class);
53
+	}
54 54
     
55
-    /**
56
-     * Force to set https scheme if https enabled.
57
-     *
58
-     * @return void
59
-     */
60
-    protected function ensureHttps()
61
-    {
62
-    	if (config('epesi.https') || config('epesi.secure')) {
63
-    		url()->forceScheme('https');
64
-    		$this->app['request']->server->set('HTTPS', true);
65
-    	}
66
-    }
55
+	/**
56
+	 * Force to set https scheme if https enabled.
57
+	 *
58
+	 * @return void
59
+	 */
60
+	protected function ensureHttps()
61
+	{
62
+		if (config('epesi.https') || config('epesi.secure')) {
63
+			url()->forceScheme('https');
64
+			$this->app['request']->server->set('HTTPS', true);
65
+		}
66
+	}
67 67
 }
Please login to merge, or discard this patch.