Completed
Push — master ( 016764...50d24f )
by judicael
04:08
created
bundles/core/Controller.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
 abstract class Controller extends Mother 
44 44
 {
45 45
 	
46
-    /**
47
-     * Cache to know if a model was initialize or not because we must initialize it just one time by script
48
-     * 
49
-     * @access private
50
-     * @var    array
51
-     */
52
-    private static $_aInitialize = array();
46
+	/**
47
+	 * Cache to know if a model was initialize or not because we must initialize it just one time by script
48
+	 * 
49
+	 * @access private
50
+	 * @var    array
51
+	 */
52
+	private static $_aInitialize = array();
53 53
     
54 54
 	/**
55 55
 	 * Constructor
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
95 95
 		 */
96 96
 		if (method_exists(get_called_class(), 'initialize')) {
97 97
 		    
98
-		    if (!isset(self::$_aInitialize[get_called_class()])) { 
98
+			if (!isset(self::$_aInitialize[get_called_class()])) { 
99 99
 		        
100
-		        static::initialize();
101
-		        self::$_aInitialize[get_called_class()] = true;
102
-		    }
100
+				static::initialize();
101
+				self::$_aInitialize[get_called_class()] = true;
102
+			}
103 103
 		}
104 104
 		
105 105
 		/**
@@ -169,12 +169,12 @@  discard block
 block discarded – undo
169 169
 	 */
170 170
 	public function __get($mKey)
171 171
 	{
172
-	    if (isset($this->di) && property_exists($this, 'di')) {
172
+		if (isset($this->di) && property_exists($this, 'di')) {
173 173
 
174
-    	    $mDi = $this->di->get($mKey);
174
+			$mDi = $this->di->get($mKey);
175 175
 
176
-    		if (isset($mDi) && $mDi !== false) { return $mDi; }
177
-	    }
176
+			if (isset($mDi) && $mDi !== false) { return $mDi; }
177
+		}
178 178
 		
179 179
 		return parent::__get($mKey);
180 180
 	}
Please login to merge, or discard this patch.
bundles/core/Config.php 1 patch
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -50,17 +50,17 @@  discard block
 block discarded – undo
50 50
 	 */
51 51
 	public static function get(string $sName, string $sPortal = null, bool $bNoDoRedirect = false)
52 52
 	{
53
-	    if ($bNoDoRedirect === true) { $sNameCache = $sName.'_true'; }
54
-	    else { $sNameCache = $sName; }
53
+		if ($bNoDoRedirect === true) { $sNameCache = $sName.'_true'; }
54
+		else { $sNameCache = $sName; }
55 55
 	    
56 56
 		if ($sPortal === null || !is_string($sPortal)) {
57 57
 		    
58
-		    if (defined('PORTAL')) {
58
+			if (defined('PORTAL')) {
59 59
 
60 60
 				$sPortal = PORTAL;
61 61
 				$aDirectories = array($sPortal);
62 62
 			}
63
-		    else {
63
+			else {
64 64
 
65 65
 				$sPortal = '';
66 66
 				$aDirectories = scandir(str_replace('core', 'src', __DIR__));
@@ -73,84 +73,84 @@  discard block
 block discarded – undo
73 73
 
74 74
 			foreach ($aDirectories as $sPortal) {
75 75
 			
76
-			    if ($sPortal != '..' && $sPortal != '.') {
76
+				if ($sPortal != '..' && $sPortal != '.') {
77 77
 
78
-        			if (file_exists(str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-local')) {
78
+					if (file_exists(str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-local')) {
79 79
         
80
-        				$sJsonFile = str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-local';
81
-        				$base = self::_mergeAndGetConf($sJsonFile, $base);
82
-        			}
80
+						$sJsonFile = str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-local';
81
+						$base = self::_mergeAndGetConf($sJsonFile, $base);
82
+					}
83 83
 
84
-        			if (file_exists(str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-local')) {
84
+					if (file_exists(str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-local')) {
85 85
         				
86
-        				$sJsonFile = str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-local';
87
-        				$base = self::_mergeAndGetConf($sJsonFile, $base);
88
-        			}
86
+						$sJsonFile = str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-local';
87
+						$base = self::_mergeAndGetConf($sJsonFile, $base);
88
+					}
89 89
 
90
-        			if (file_exists(str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev') && getenv('DEV') == 1) {
90
+					if (file_exists(str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev') && getenv('DEV') == 1) {
91 91
         
92
-        				$sJsonFile = str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev';
93
-        				$base = self::_mergeAndGetConf($sJsonFile, $base);
94
-        			}
92
+						$sJsonFile = str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev';
93
+						$base = self::_mergeAndGetConf($sJsonFile, $base);
94
+					}
95 95
 
96
-        			if (file_exists(str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev') && getenv('DEV') == 1) {
96
+					if (file_exists(str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev') && getenv('DEV') == 1) {
97 97
         
98
-        				$sJsonFile = str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev';
99
-        				$base = self::_mergeAndGetConf($sJsonFile, $base);
100
-        			}
98
+						$sJsonFile = str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev';
99
+						$base = self::_mergeAndGetConf($sJsonFile, $base);
100
+					}
101 101
 
102
-        			if (file_exists(str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev') && getenv('PROD') == 1) {
102
+					if (file_exists(str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev') && getenv('PROD') == 1) {
103 103
         
104
-        				$sJsonFile = str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-prod';
105
-        				$base = self::_mergeAndGetConf($sJsonFile, $base);
106
-        			}
104
+						$sJsonFile = str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-prod';
105
+						$base = self::_mergeAndGetConf($sJsonFile, $base);
106
+					}
107 107
 
108
-        			if (file_exists(str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev') && getenv('PROD') == 1) {
108
+					if (file_exists(str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev') && getenv('PROD') == 1) {
109 109
         
110
-        				$sJsonFile = str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-prod';
111
-        				$base = self::_mergeAndGetConf($sJsonFile, $base);
112
-        			}
110
+						$sJsonFile = str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-prod';
111
+						$base = self::_mergeAndGetConf($sJsonFile, $base);
112
+					}
113 113
 
114
-        			if (file_exists(str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev') && getenv('PREPROD') == 1) {
114
+					if (file_exists(str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev') && getenv('PREPROD') == 1) {
115 115
         
116
-        				$sJsonFile = str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-pprod';
117
-        				$base = self::_mergeAndGetConf($sJsonFile, $base);
118
-        			}
116
+						$sJsonFile = str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-pprod';
117
+						$base = self::_mergeAndGetConf($sJsonFile, $base);
118
+					}
119 119
 
120
-        			if (file_exists(str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev') && getenv('PREPROD') == 1) {
120
+					if (file_exists(str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev') && getenv('PREPROD') == 1) {
121 121
         
122
-        				$sJsonFile = str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-pprod';
123
-        				$base = self::_mergeAndGetConf($sJsonFile, $base);
124
-        			}
122
+						$sJsonFile = str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-pprod';
123
+						$base = self::_mergeAndGetConf($sJsonFile, $base);
124
+					}
125 125
 
126
-        			if (file_exists(str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev') && getenv('RECETTE') == 1) {
126
+					if (file_exists(str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev') && getenv('RECETTE') == 1) {
127 127
         
128
-        				$sJsonFile = str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-rec';
129
-        				$base = self::_mergeAndGetConf($sJsonFile, $base);
130
-        			}
128
+						$sJsonFile = str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-rec';
129
+						$base = self::_mergeAndGetConf($sJsonFile, $base);
130
+					}
131 131
 
132
-        			if (file_exists(str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev') && getenv('RECETTE') == 1) {
132
+					if (file_exists(str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-dev') && getenv('RECETTE') == 1) {
133 133
         
134
-        				$sJsonFile = str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-rec';
135
-        				$base = self::_mergeAndGetConf($sJsonFile, $base);
136
-        			}
134
+						$sJsonFile = str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-rec';
135
+						$base = self::_mergeAndGetConf($sJsonFile, $base);
136
+					}
137 137
 
138
-        			if (file_exists(str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-local')) {
138
+					if (file_exists(str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-local')) {
139 139
         
140
-        				$sJsonFile = str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-local';
141
-        				$base = self::_mergeAndGetConf($sJsonFile, $base);
142
-        			}
140
+						$sJsonFile = str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf-local';
141
+						$base = self::_mergeAndGetConf($sJsonFile, $base);
142
+					}
143 143
 
144
-        			if (file_exists(str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf')) {
144
+					if (file_exists(str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf')) {
145 145
         
146
-        				$sJsonFile = str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf';
147
-        				$base = self::_mergeAndGetConf($sJsonFile, $base);
148
-        			}
146
+						$sJsonFile = str_replace('core', 'src'.DIRECTORY_SEPARATOR.$sPortal.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf';
147
+						$base = self::_mergeAndGetConf($sJsonFile, $base);
148
+					}
149 149
         
150
-        			$sJsonFile = str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf';
151
-        			$base = self::_mergeAndGetConf($sJsonFile, $base);
152
-			    }
153
-		    }
150
+					$sJsonFile = str_replace('core', 'conf', __DIR__).DIRECTORY_SEPARATOR.$sName.'.conf';
151
+					$base = self::_mergeAndGetConf($sJsonFile, $base);
152
+				}
153
+			}
154 154
 
155 155
 			if ($base === '') {
156 156
 				
@@ -183,10 +183,10 @@  discard block
 block discarded – undo
183 183
 	 */
184 184
 	public static function getBundleLocationName(string $sName): string
185 185
 	{
186
-	    $oConfig = self::get($sName, null, true);
186
+		$oConfig = self::get($sName, null, true);
187 187
 
188
-	    if (isset($oConfig->redirect)) { return $oConfig->redirect; }
189
-	    else { return PORTAL; }
188
+		if (isset($oConfig->redirect)) { return $oConfig->redirect; }
189
+		else { return PORTAL; }
190 190
 	}
191 191
 
192 192
 	/**
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 			echo "The Json ".$sFileToMerge." has an error! Please verify!\n";
212 212
 			$oDebug = Debug::getInstance();
213 213
 			$oDebug->error("The Json ".$sFileToMerge." has an error! Please verify!\n");
214
-            new \Exception("The Json ".$sFileToMerge." has an error! Please verify!\n");
214
+			new \Exception("The Json ".$sFileToMerge." has an error! Please verify!\n");
215 215
 		}
216 216
 	}
217 217
 
Please login to merge, or discard this patch.
bundles/core/Router.php 1 patch
Indentation   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
 	 */
83 83
 	public function __construct() 
84 84
 	{
85
-	    $oLogger = Debug::getInstance();
86
-	    $this->setLogger($oLogger);
85
+		$oLogger = Debug::getInstance();
86
+		$this->setLogger($oLogger);
87 87
 	}
88 88
 
89 89
 	/**
@@ -100,123 +100,123 @@  discard block
 block discarded – undo
100 100
 
101 101
 		if (Request::isHttpRequest()) {
102 102
         
103
-		    // Search if a Less file exists
104
-		    if (defined('LESS_ACTIVE') && LESS_ACTIVE === true) {
103
+			// Search if a Less file exists
104
+			if (defined('LESS_ACTIVE') && LESS_ACTIVE === true) {
105 105
 		        
106
-		        if (strstr($_SERVER['REQUEST_URI'], '.css')
107
-                    && file_exists(preg_replace('/\.css/', '.less', $_SERVER['REQUEST_URI']))) {
106
+				if (strstr($_SERVER['REQUEST_URI'], '.css')
107
+					&& file_exists(preg_replace('/\.css/', '.less', $_SERVER['REQUEST_URI']))) {
108 108
 		        
109
-		            Less::toCss($_SERVER['REQUEST_URI']);
110
-		            exit;
111
-		        }
112
-		    }
109
+					Less::toCss($_SERVER['REQUEST_URI']);
110
+					exit;
111
+				}
112
+			}
113 113
 		    
114
-		    // Search if a typescript file exists
115
-		    if (defined('TYPESCRIPT_ACTIVE') && TYPESCRIPT_ACTIVE === true) {
114
+			// Search if a typescript file exists
115
+			if (defined('TYPESCRIPT_ACTIVE') && TYPESCRIPT_ACTIVE === true) {
116 116
 		    
117
-		        if (strstr($_SERVER['REQUEST_URI'], '.js')
118
-		        && file_exists(preg_replace('/\.js/', '.ts', $_SERVER['REQUEST_URI']))) {
117
+				if (strstr($_SERVER['REQUEST_URI'], '.js')
118
+				&& file_exists(preg_replace('/\.js/', '.ts', $_SERVER['REQUEST_URI']))) {
119 119
 		    
120
-		            Typescript::toJs($_SERVER['REQUEST_URI']);
121
-		            exit;
122
-		        }
123
-		    }
120
+					Typescript::toJs($_SERVER['REQUEST_URI']);
121
+					exit;
122
+				}
123
+			}
124 124
 		    
125
-		    // Search public files in all plugins
126
-		    if ($_SERVER['REQUEST_URI'] !== '/') {
125
+			// Search public files in all plugins
126
+			if ($_SERVER['REQUEST_URI'] !== '/') {
127 127
 	
128
-    		    foreach (Config::get('Plugins')->list as $iKey => $sPlugin) {
128
+				foreach (Config::get('Plugins')->list as $iKey => $sPlugin) {
129 129
     		        
130
-    		        if (file_exists(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.$sPlugin.DIRECTORY_SEPARATOR.'public'.$_SERVER['REQUEST_URI'])) {
130
+					if (file_exists(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.$sPlugin.DIRECTORY_SEPARATOR.'public'.$_SERVER['REQUEST_URI'])) {
131 131
     		            
132
-    		            echo file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.$sPlugin.DIRECTORY_SEPARATOR.'public'.$_SERVER['REQUEST_URI']);
133
-                        exit;
134
-    		        }
135
-                    else if (strstr($_SERVER['REQUEST_URI'], '.css')
136
-		                && file_exists(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.$sPlugin.DIRECTORY_SEPARATOR.'public'.preg_replace('/\.css/', '.less', $_SERVER['REQUEST_URI']))) {
137
-
138
-		                Less::toCss(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.$sPlugin.DIRECTORY_SEPARATOR.'public'.preg_replace('/\.css/', '.less', $_SERVER['REQUEST_URI']));
139
-		                exit;
140
-                    }
141
-		            else if (strstr($_SERVER['REQUEST_URI'], '.js')
142
-		                && file_exists(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.$sPlugin.DIRECTORY_SEPARATOR.'public'.preg_replace('/\.js/', '.ts', $_SERVER['REQUEST_URI']))) {
143
-
144
-		                Typescript::toJs(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.$sPlugin.DIRECTORY_SEPARATOR.'public'.preg_replace('/\.js/', '.ts', $_SERVER['REQUEST_URI']));
145
-		                exit;
146
-		            }
147
-		        }
148
-	        }
132
+						echo file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.$sPlugin.DIRECTORY_SEPARATOR.'public'.$_SERVER['REQUEST_URI']);
133
+						exit;
134
+					}
135
+					else if (strstr($_SERVER['REQUEST_URI'], '.css')
136
+						&& file_exists(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.$sPlugin.DIRECTORY_SEPARATOR.'public'.preg_replace('/\.css/', '.less', $_SERVER['REQUEST_URI']))) {
137
+
138
+						Less::toCss(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.$sPlugin.DIRECTORY_SEPARATOR.'public'.preg_replace('/\.css/', '.less', $_SERVER['REQUEST_URI']));
139
+						exit;
140
+					}
141
+					else if (strstr($_SERVER['REQUEST_URI'], '.js')
142
+						&& file_exists(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.$sPlugin.DIRECTORY_SEPARATOR.'public'.preg_replace('/\.js/', '.ts', $_SERVER['REQUEST_URI']))) {
143
+
144
+						Typescript::toJs(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.$sPlugin.DIRECTORY_SEPARATOR.'public'.preg_replace('/\.js/', '.ts', $_SERVER['REQUEST_URI']));
145
+						exit;
146
+					}
147
+				}
148
+			}
149 149
 		    
150 150
 			foreach (Config::get('Route') as $sMultiHost => $oHost) {
151 151
 
152
-			    foreach (explode(',', $sMultiHost) as $sHost) {
152
+				foreach (explode(',', $sMultiHost) as $sHost) {
153 153
 
154
-    				if ((!strstr($sHost, '/') && $sHost == $_SERVER['HTTP_HOST']) || (strstr($sHost, '/')
155
-    					&& strstr($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'], $sHost))) {
154
+					if ((!strstr($sHost, '/') && $sHost == $_SERVER['HTTP_HOST']) || (strstr($sHost, '/')
155
+						&& strstr($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'], $sHost))) {
156 156
     
157
-    					$this->_oRoutes = $oHost;
157
+						$this->_oRoutes = $oHost;
158 158
 
159
-    					if (strstr($sHost, '/')
160
-    						&& strstr($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'], $sHost)) {
159
+						if (strstr($sHost, '/')
160
+							&& strstr($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'], $sHost)) {
161 161
 
162
-    						$this->_sBaseUri = preg_replace('#^[^/]+#', '', $sHost);
163
-    					}
162
+							$this->_sBaseUri = preg_replace('#^[^/]+#', '', $sHost);
163
+						}
164 164
     
165
-    					if (isset($oHost->location)) {
165
+						if (isset($oHost->location)) {
166 166
     
167
-    						header('Status: 301 Moved Permanently', false, 301);
168
-    	  					header('Location: '.$oHost->location);
169
-    	  					exit;
170
-    					}
171
-    					else if (preg_match('#getCss\?#', $_SERVER['REQUEST_URI'])) {
167
+							header('Status: 301 Moved Permanently', false, 301);
168
+		  					header('Location: '.$oHost->location);
169
+		  					exit;
170
+						}
171
+						else if (preg_match('#getCss\?#', $_SERVER['REQUEST_URI'])) {
172 172
     					    
173
-    					    foreach ($_GET as $sKey => $sValue) {
173
+							foreach ($_GET as $sKey => $sValue) {
174 174
 
175
-    					        if (file_exists(str_replace(DIRECTORY_SEPARATOR.'core', DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR, __DIR__).$sKey.'.css')) {
175
+								if (file_exists(str_replace(DIRECTORY_SEPARATOR.'core', DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR, __DIR__).$sKey.'.css')) {
176 176
     					            
177
-    					            echo file_get_contents(str_replace(DIRECTORY_SEPARATOR.'core', DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR, __DIR__).$sKey.'.css')."\n";
178
-    					        }
179
-    					    }
177
+									echo file_get_contents(str_replace(DIRECTORY_SEPARATOR.'core', DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR, __DIR__).$sKey.'.css')."\n";
178
+								}
179
+							}
180 180
     					    
181
-    					    exit;
182
-    					}
183
-    					else if (preg_match('#getJs\?#', $_SERVER['REQUEST_URI'])) {
181
+							exit;
182
+						}
183
+						else if (preg_match('#getJs\?#', $_SERVER['REQUEST_URI'])) {
184 184
     					    
185
-    					    foreach ($_GET as $sKey => $sValue) {
185
+							foreach ($_GET as $sKey => $sValue) {
186 186
 
187
-    					        if (file_exists(str_replace(DIRECTORY_SEPARATOR.'core', DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR, __DIR__).$sKey.'.js')) {
187
+								if (file_exists(str_replace(DIRECTORY_SEPARATOR.'core', DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR, __DIR__).$sKey.'.js')) {
188 188
     					            
189
-    					            echo file_get_contents(str_replace(DIRECTORY_SEPARATOR.'core', DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR, __DIR__).$sKey.'.js')."\n";
190
-    					        }
191
-    					    }
189
+									echo file_get_contents(str_replace(DIRECTORY_SEPARATOR.'core', DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR, __DIR__).$sKey.'.js')."\n";
190
+								}
191
+							}
192 192
     					    
193
-    					    exit;
194
-    					}
195
-    					else if (isset($oHost->routes)) {
193
+							exit;
194
+						}
195
+						else if (isset($oHost->routes)) {
196 196
     
197
-    						foreach($oHost->routes as $sKey => $oRoute) {
197
+							foreach($oHost->routes as $sKey => $oRoute) {
198 198
 
199
-    							$mReturn = $this->_route($oRoute, $_SERVER['REQUEST_URI']);
199
+								$mReturn = $this->_route($oRoute, $_SERVER['REQUEST_URI']);
200 200
 
201
-    							if ($mReturn === 403) {
201
+								if ($mReturn === 403) {
202 202
     
203
-    								$this->_getPage403();
204
-    							}
205
-    							else if ($mReturn === true) {
203
+									$this->_getPage403();
204
+								}
205
+								else if ($mReturn === true) {
206 206
     
207
-    								if (isset($oRoute->cache)) { $this->_checkCache($oRoute->cache); }
207
+									if (isset($oRoute->cache)) { $this->_checkCache($oRoute->cache); }
208 208
     
209
-    								return true;
210
-    							}							
211
-    						}
209
+									return true;
210
+								}							
211
+							}
212 212
     
213
-    						$this->_getPage404();
214
-    					}
215
-    				}
216
-			    }
213
+							$this->_getPage404();
214
+						}
215
+					}
216
+				}
217 217
 			}
218 218
 		}
219
-        else if (Request::isCliRequest()) {
219
+		else if (Request::isCliRequest()) {
220 220
 
221 221
 			if (isset($_SERVER['argv'])) { $aArguments = $_SERVER['argv']; }
222 222
 			else { $aArguments = $argv; }
@@ -224,15 +224,15 @@  discard block
 block discarded – undo
224 224
 			define('PORTAL', 'Batch');
225 225
 			set_include_path(get_include_path().PATH_SEPARATOR.'src'.PATH_SEPARATOR.PORTAL.PATH_SEPARATOR.'public');
226 226
 
227
-            if (!isset($aArguments[1]) && strstr($aArguments[0], '/phpunit')) {
227
+			if (!isset($aArguments[1]) && strstr($aArguments[0], '/phpunit')) {
228 228
 
229
-                $sBatchName = "phpunit";
230
-                $aArguments[0] = "bin/console";
231
-                $aArguments[1] = "phpunit";
232
-            }
233
-            else {
234
-                $sBatchName = $aArguments[1];
235
-            }
229
+				$sBatchName = "phpunit";
230
+				$aArguments[0] = "bin/console";
231
+				$aArguments[1] = "phpunit";
232
+			}
233
+			else {
234
+				$sBatchName = $aArguments[1];
235
+			}
236 236
 
237 237
 			if (isset(Config::get('Route')->batch->script->{$sBatchName})) {
238 238
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 						array_shift($aArguments);
275 275
 					}
276 276
 				}
277
-      		}
277
+	  		}
278 278
 
279 279
 			if (isset($oBatch->controller) && isset($oBatch->action)) {
280 280
 
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 			foreach (Config::get('Route') as $sHost => $oHost) {
348 348
 
349 349
 				if ((!strstr($sHost, '/') && $sHost == $_SERVER['HTTP_HOST'])
350
-				    || (strstr($sHost, '/') && strstr($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'], $sHost))) {
350
+					|| (strstr($sHost, '/') && strstr($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'], $sHost))) {
351 351
 
352 352
 					$this->_oRoutes = $oHost->routes;
353 353
 
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 
378 378
 		if (isset($oRoute->route)) {
379 379
 
380
-		    $sRoute = str_replace("*", ".*", $oRoute->route);
380
+			$sRoute = str_replace("*", ".*", $oRoute->route);
381 381
 
382 382
 			$sFinalRoute = preg_replace_callback(
383 383
 				'|\[/{0,1}:([a-zA-Z_]+)\]|',
@@ -453,8 +453,8 @@  discard block
 block discarded – undo
453 453
 
454 454
 			if (isset($oRoute->controller)) {
455 455
 
456
-			    define('PORTAL', preg_replace('/^\\\\Venus\\\\src\\\\([a-zA-Z0-9_]+)\\\\.+$/', '$1', $oRoute->controller));
457
-			    set_include_path(get_include_path().PATH_SEPARATOR.'src'.PATH_SEPARATOR.PORTAL.PATH_SEPARATOR.'public');
456
+				define('PORTAL', preg_replace('/^\\\\Venus\\\\src\\\\([a-zA-Z0-9_]+)\\\\.+$/', '$1', $oRoute->controller));
457
+				set_include_path(get_include_path().PATH_SEPARATOR.'src'.PATH_SEPARATOR.PORTAL.PATH_SEPARATOR.'public');
458 458
 			     
459 459
 				if (isset($oRoute->content_type)) {
460 460
 
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
 						}
509 509
 						else {
510 510
 
511
-						    $this->_oLogger->warning('Error: Parameter '.$sName.' not exists!');
511
+							$this->_oLogger->warning('Error: Parameter '.$sName.' not exists!');
512 512
 							break;
513 513
 						}
514 514
 					}
@@ -534,10 +534,10 @@  discard block
 block discarded – undo
534 534
 			}
535 535
 			else if (isset($oRoute->template) && isset($oRoute->layout) && $oRoute->layout === true) {
536 536
 
537
-			    define('PORTAL', preg_replace('/^\\\\Venus\\\\src\\\\([a-zA-Z0-9_]+)\\\\.+$/', '$1', $oRoute->template));
538
-			    set_include_path(get_include_path().PATH_SEPARATOR.'src'.PATH_SEPARATOR.PORTAL.PATH_SEPARATOR.'public');
537
+				define('PORTAL', preg_replace('/^\\\\Venus\\\\src\\\\([a-zA-Z0-9_]+)\\\\.+$/', '$1', $oRoute->template));
538
+				set_include_path(get_include_path().PATH_SEPARATOR.'src'.PATH_SEPARATOR.PORTAL.PATH_SEPARATOR.'public');
539 539
 			    
540
-			    $oLayout = Vendor::getVendor('Apollina\Template', DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.PORTAL.DIRECTORY_SEPARATOR.'View'.DIRECTORY_SEPARATOR.'Layout.tpl');
540
+				$oLayout = Vendor::getVendor('Apollina\Template', DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.PORTAL.DIRECTORY_SEPARATOR.'View'.DIRECTORY_SEPARATOR.'Layout.tpl');
541 541
 
542 542
 				if (isset($oRoute->vars)) {
543 543
 
@@ -552,8 +552,8 @@  discard block
 block discarded – undo
552 552
 			}
553 553
 			else if (isset($oRoute->template)) {
554 554
 
555
-			    define('PORTAL', preg_replace('/^\\\\Venus\\\\src\\\\([a-zA-Z0-9_]+)\\\\.+$/', '$1', $oRoute->template));
556
-			    set_include_path(get_include_path().PATH_SEPARATOR.'src'.PATH_SEPARATOR.PORTAL.PATH_SEPARATOR.'public');
555
+				define('PORTAL', preg_replace('/^\\\\Venus\\\\src\\\\([a-zA-Z0-9_]+)\\\\.+$/', '$1', $oRoute->template));
556
+				set_include_path(get_include_path().PATH_SEPARATOR.'src'.PATH_SEPARATOR.PORTAL.PATH_SEPARATOR.'public');
557 557
 			    
558 558
 				$oTemplate = Vendor::getVendor('Apollina\Template', DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.PORTAL.DIRECTORY_SEPARATOR.'View'.DIRECTORY_SEPARATOR.$oRoute->template.'.tpl');
559 559
 
@@ -653,14 +653,14 @@  discard block
 block discarded – undo
653 653
 		
654 654
 		if (method_exists($oController, 'beforeExecuteRoute')) { 
655 655
 		    
656
-		    call_user_func_array(array($oController, 'beforeExecuteRoute'), array());
656
+			call_user_func_array(array($oController, 'beforeExecuteRoute'), array());
657 657
 		}
658 658
 
659 659
 		$mReturnController = call_user_func_array(array($oController, $sActionName), $aParams);
660 660
 
661 661
 		if (method_exists($oController, 'afterExecuteRoute')) { 
662 662
 		    
663
-		    call_user_func_array(array($oController, 'afterExecuteRoute'), array());
663
+			call_user_func_array(array($oController, 'afterExecuteRoute'), array());
664 664
 		}
665 665
 		
666 666
 		$mReturn = ob_get_clean();
@@ -800,6 +800,6 @@  discard block
 block discarded – undo
800 800
 	 */
801 801
 	public function setLogger(LoggerInterface $logger) {
802 802
 	    
803
-	    $this->_oLogger = $logger;
803
+		$this->_oLogger = $logger;
804 804
 	}
805 805
 }
Please login to merge, or discard this patch.
bundles/lib/Response/Yaml.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,15 +34,15 @@
 block discarded – undo
34 34
 {
35 35
 	/**
36 36
 	 * translate the content
37
-     * @see \Venus\lib\Response\ResponseInterface::translate()
37
+	 * @see \Venus\lib\Response\ResponseInterface::translate()
38 38
 	 *
39 39
 	 * @access public
40 40
 	 * @param  mixed $mContent content to translate
41 41
 	 * @return mixed
42 42
 	 */
43
-    public static function translate($mContent)
44
-    {
45
-        return yaml_emit($mContent);
46
-    }
43
+	public static function translate($mContent)
44
+	{
45
+		return yaml_emit($mContent);
46
+	}
47 47
 
48 48
 }
Please login to merge, or discard this patch.
bundles/lib/Response/Mock.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@
 block discarded – undo
40 40
 	 * @param  mixed $mContent content to translate
41 41
 	 * @return mixed
42 42
 	 */
43
-    public static function translate($mContent)
44
-    {
45
-        return $mContent;
46
-    }
43
+	public static function translate($mContent)
44
+	{
45
+		return $mContent;
46
+	}
47 47
 
48 48
 }
Please login to merge, or discard this patch.
bundles/lib/Response/Json.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@
 block discarded – undo
41 41
 	 * @param  mixed $mContent content to translate
42 42
 	 * @return mixed
43 43
 	 */
44
-    public static function translate($mContent)
45
-    {
46
-        return json_encode(ObjectOperation::objectToArray($mContent));
47
-    }
44
+	public static function translate($mContent)
45
+	{
46
+		return json_encode(ObjectOperation::objectToArray($mContent));
47
+	}
48 48
 
49 49
 }
Please login to merge, or discard this patch.
bundles/lib/Cache/Redis.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -32,26 +32,26 @@  discard block
 block discarded – undo
32 32
  */
33 33
 class Redis extends RealRedis implements CacheInterface
34 34
 {
35
-    /**
36
-     * constructor with the connection to Redis
37
-     *
38
-     * @access public
39
-     * @param  string $sName name of the session
40
-     * @param  int $iFlags flags
41
-     * @param  int $iTimeout expiration of cache
42
-     * @return mixed
43
-     * @throws \Exception
44
-     */
45
-    public function __construct($oConf)
46
-    {
47
-    	if (!$this->connect($oConf->host, $oConf->port)) {
35
+	/**
36
+	 * constructor with the connection to Redis
37
+	 *
38
+	 * @access public
39
+	 * @param  string $sName name of the session
40
+	 * @param  int $iFlags flags
41
+	 * @param  int $iTimeout expiration of cache
42
+	 * @return mixed
43
+	 * @throws \Exception
44
+	 */
45
+	public function __construct($oConf)
46
+	{
47
+		if (!$this->connect($oConf->host, $oConf->port)) {
48 48
     	    
49
-    		throw new \Exception('Redis server unavailable');
50
-    	}
49
+			throw new \Exception('Redis server unavailable');
50
+		}
51 51
     
52
-    	// Select the REDIS db index
53
-    	$this->select($oConf->index);
54
-    }
52
+		// Select the REDIS db index
53
+		$this->select($oConf->index);
54
+	}
55 55
 
56 56
 	/**
57 57
 	 * get a value
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 */
65 65
 	public function get(string $sName, int &$iFlags = null, int $iTimeout = 0)
66 66
 	{ 
67
-	    return parent::get($sName);
67
+		return parent::get($sName);
68 68
 	}
69 69
 	
70 70
 	/**
Please login to merge, or discard this patch.
bundles/lib/Request/RequestInterface.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@
 block discarded – undo
9 9
 
10 10
 interface RequestInterface
11 11
 {
12
-    /**
13
-     * get parameter
14
-     * @param string $name
15
-     * @param string $default
16
-     * @return string
17
-     */
18
-    public function get(string $name, string $default = null) : string;
12
+	/**
13
+	 * get parameter
14
+	 * @param string $name
15
+	 * @param string $default
16
+	 * @return string
17
+	 */
18
+	public function get(string $name, string $default = null) : string;
19 19
 }
Please login to merge, or discard this patch.
bundles/lib/Request/Files.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -9,19 +9,19 @@
 block discarded – undo
9 9
 
10 10
 class Files implements RequestInterface
11 11
 {
12
-    /**
13
-     * get parameter
14
-     * @param string $name
15
-     * @param string $default
16
-     * @return string
17
-     */
18
-    public function get(string $name, string $default = null) : string
19
-    {
20
-        if (isset($_FILES[$name]) && $_FILES[$name] != '') {
21
-            return $_FILES[$name];
22
-        }
23
-        else if ($default !== null) {
24
-            return $default;
25
-        }
26
-    }
12
+	/**
13
+	 * get parameter
14
+	 * @param string $name
15
+	 * @param string $default
16
+	 * @return string
17
+	 */
18
+	public function get(string $name, string $default = null) : string
19
+	{
20
+		if (isset($_FILES[$name]) && $_FILES[$name] != '') {
21
+			return $_FILES[$name];
22
+		}
23
+		else if ($default !== null) {
24
+			return $default;
25
+		}
26
+	}
27 27
 }
Please login to merge, or discard this patch.