Test Failed
Push — master ( d2395b...794710 )
by Georgi
03:09
created
src/UI.php 2 patches
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -26,21 +26,21 @@  discard block
 block discarded – undo
26 26
 	{
27 27
 		parent::__construct([
28 28
 				'title' => config('epesi.ui.title', 'EPESI'),
29
-		        'cdn' => array_merge($this->cdn, (array) config('epesi.ui.cdn')),
29
+				'cdn' => array_merge($this->cdn, (array) config('epesi.ui.cdn')),
30 30
 				//TODO: set the skin from admin / user selection
31
-		        'skin' => config('epesi.ui.skin', $this->skin),
32
-		        'template_dir' => array_merge(ModuleManager::collect('templates', $this->skin), (array) $this->template_dir),
33
-		        'catch_error_types' => config('app.debug') ? 
34
-		                  // debug mode
35
-		                  E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_USER_DEPRECATED : 
36
-		                  // production mode
37
-		                  E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR
31
+				'skin' => config('epesi.ui.skin', $this->skin),
32
+				'template_dir' => array_merge(ModuleManager::collect('templates', $this->skin), (array) $this->template_dir),
33
+				'catch_error_types' => config('app.debug') ? 
34
+						  // debug mode
35
+						  E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_USER_DEPRECATED : 
36
+						  // production mode
37
+						  E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR
38 38
 		]);
39 39
 	}
40 40
 	
41 41
 	final public static function module()
42 42
 	{
43
-	    return System\SystemCore::class;
43
+		return System\SystemCore::class;
44 44
 	}
45 45
 	
46 46
 	public function response()
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	
60 60
 	public function render()
61 61
 	{			
62
-	    System\SystemCore::requireCSS('epesi.css');
62
+		System\SystemCore::requireCSS('epesi.css');
63 63
 	    
64 64
 		$this->addCsrfToken();
65 65
 		
@@ -82,18 +82,18 @@  discard block
 block discarded – undo
82 82
 	 */
83 83
 	public function renderException($exception)
84 84
 	{
85
-	    ob_start();
86
-	    if ($exception instanceof TokenMismatchException) {
87
-	        $this->jsRedirectHomepage(__('Session expired! Redirecting to login screen ...'));
88
-	    }
89
-	    elseif ($exception instanceof NotFoundHttpException) {
90
-	        $this->jsRedirectHomepage(__('Requested page not found! Redirecting to your home page ...'));
91
-	    }	    
92
-	    else {
93
-	        $this->caughtException($exception);
94
-	    }
85
+		ob_start();
86
+		if ($exception instanceof TokenMismatchException) {
87
+			$this->jsRedirectHomepage(__('Session expired! Redirecting to login screen ...'));
88
+		}
89
+		elseif ($exception instanceof NotFoundHttpException) {
90
+			$this->jsRedirectHomepage(__('Requested page not found! Redirecting to your home page ...'));
91
+		}	    
92
+		else {
93
+			$this->caughtException($exception);
94
+		}
95 95
 	    
96
-	    return ob_get_clean();
96
+		return ob_get_clean();
97 97
 	}
98 98
 	
99 99
 	/**
@@ -103,20 +103,20 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	public function jsRedirectHomepage($message)
105 105
 	{
106
-	    $homepageUrl = url(HomePage\Models\HomePage::pathOfUser());
106
+		$homepageUrl = url(HomePage\Models\HomePage::pathOfUser());
107 107
 	    
108
-	    $redirectJs = $this->jsRedirectConfirm($homepageUrl, $message)->jsRender();
108
+		$redirectJs = $this->jsRedirectConfirm($homepageUrl, $message)->jsRender();
109 109
 	    
110
-	    if ($this->isJsonRequest()) {
111
-	        $this->outputResponseJSON([
112
-	                'success'   => true,
113
-	                'message'   => $message,
114
-	                'atkjs'   => $redirectJs
115
-	        ]);
116
-	    }
117
-	    else {
118
-	        $this->outputResponseHTML($this->getTag('script', $redirectJs));
119
-	    }
110
+		if ($this->isJsonRequest()) {
111
+			$this->outputResponseJSON([
112
+					'success'   => true,
113
+					'message'   => $message,
114
+					'atkjs'   => $redirectJs
115
+			]);
116
+		}
117
+		else {
118
+			$this->outputResponseHTML($this->getTag('script', $redirectJs));
119
+		}
120 120
 	}
121 121
 	
122 122
 	/**
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
 	 */
129 129
 	public function jsRedirectConfirm($page, $message)
130 130
 	{
131
-	    $redirectJs = $this->jsRedirect($page)->jsRender();
131
+		$redirectJs = $this->jsRedirect($page)->jsRender();
132 132
 	    
133
-	    return new jsExpression("if (confirm([])) { $redirectJs }", [$message]);
133
+		return new jsExpression("if (confirm([])) { $redirectJs }", [$message]);
134 134
 	}
135 135
 	
136 136
 	/**
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -85,11 +85,9 @@  discard block
 block discarded – undo
85 85
 	    ob_start();
86 86
 	    if ($exception instanceof TokenMismatchException) {
87 87
 	        $this->jsRedirectHomepage(__('Session expired! Redirecting to login screen ...'));
88
-	    }
89
-	    elseif ($exception instanceof NotFoundHttpException) {
88
+	    } elseif ($exception instanceof NotFoundHttpException) {
90 89
 	        $this->jsRedirectHomepage(__('Requested page not found! Redirecting to your home page ...'));
91
-	    }	    
92
-	    else {
90
+	    } else {
93 91
 	        $this->caughtException($exception);
94 92
 	    }
95 93
 	    
@@ -113,8 +111,7 @@  discard block
 block discarded – undo
113 111
 	                'message'   => $message,
114 112
 	                'atkjs'   => $redirectJs
115 113
 	        ]);
116
-	    }
117
-	    else {
114
+	    } else {
118 115
 	        $this->outputResponseHTML($this->getTag('script', $redirectJs));
119 116
 	    }
120 117
 	}
Please login to merge, or discard this patch.