Completed
Push — master ( 07b0df...49d7fe )
by judicael
04:07
created
bundles/lib/Less.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
  */
31 31
 class Less
32 32
 {
33
-    /**
34
-     * @var string
35
-     */
36
-    const LESS_WINDOWS = LESS_WINDOWS;
33
+	/**
34
+	 * @var string
35
+	 */
36
+	const LESS_WINDOWS = LESS_WINDOWS;
37 37
     
38 38
 	/**
39 39
 	 * translate the content
@@ -44,18 +44,18 @@  discard block
 block discarded – undo
44 44
 	 */
45 45
 	public static function toCss(string $sFile)
46 46
 	{
47
-	    if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
47
+		if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
48 48
 	        
49
-	        $sCmd = self::LESS_WINDOWS." ".$sFile." --watch";
50
-            $sContent = shell_exec($sCmd);
51
-	    }
52
-	    else {
49
+			$sCmd = self::LESS_WINDOWS." ".$sFile." --watch";
50
+			$sContent = shell_exec($sCmd);
51
+		}
52
+		else {
53 53
 	       
54
-	        $sCmd = "lessc ".$sFile." --no-color 2>&1";
55
-            $sContent = shell_exec($sCmd);
56
-	    }
54
+			$sCmd = "lessc ".$sFile." --no-color 2>&1";
55
+			$sContent = shell_exec($sCmd);
56
+		}
57 57
 	    
58
-        header("content-type:text/css");
59
-        echo $sContent;
58
+		header("content-type:text/css");
59
+		echo $sContent;
60 60
 	}
61 61
 }
Please login to merge, or discard this patch.
bundles/lib/Functions/Asset.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -39,29 +39,29 @@
 block discarded – undo
39 39
 	 */
40 40
 	public function replaceBy(array $aParams = array()) : string
41 41
 	{
42
-	    $aParams['template'] = trim(str_replace(["'", '"'], "", $aParams['template']));
42
+		$aParams['template'] = trim(str_replace(["'", '"'], "", $aParams['template']));
43 43
 	    
44 44
 		if (isset($aParams['template'])) {
45 45
 
46
-		    $aTemplates = explode(';', $aParams['template']);
47
-		    $sGetUrl = 'getCss?';
46
+			$aTemplates = explode(';', $aParams['template']);
47
+			$sGetUrl = 'getCss?';
48 48
 		    
49
-		    foreach ($aTemplates as $sTemplate) {
49
+			foreach ($aTemplates as $sTemplate) {
50 50
 		     
51
-    		    if (strstr($sTemplate, 'css/')) {
51
+				if (strstr($sTemplate, 'css/')) {
52 52
     			
53
-    		        $sGetUrl .= $sTemplate.'&';
54
-    		    }
55
-    		    else if (strstr($sTemplate, 'js/')) {
53
+					$sGetUrl .= $sTemplate.'&';
54
+				}
55
+				else if (strstr($sTemplate, 'js/')) {
56 56
     		        
57
-    		        $sGetUrl .= $sTemplate.'&';
58
-    		    }
59
-		    }
57
+					$sGetUrl .= $sTemplate.'&';
58
+				}
59
+			}
60 60
 		   
61
-		    if (defined('ASSET_VERSION') && ASSET_VERSION !== false) {
61
+			if (defined('ASSET_VERSION') && ASSET_VERSION !== false) {
62 62
 		        
63
-		        $sGetUrl .= ASSET_VERSION;
64
-		    }
63
+				$sGetUrl .= ASSET_VERSION;
64
+			}
65 65
 
66 66
 			return $sGetUrl;
67 67
 		}
Please login to merge, or discard this patch.
bundles/lib/GoogleMap/Geocoding.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -28,30 +28,30 @@
 block discarded – undo
28 28
  */
29 29
 class Geocoding
30 30
 {
31
-    /**
32
-     * get the URL with the signature for the Pro account of Google Map
33
-     * 
34
-     * @access public
35
-     * @param unknown $sUrlToSign
36
-     * @param unknown $sClientId
37
-     * @param unknown $sPrivateKey
38
-     * @return string
39
-     */
40
-    public static function signUrlForGoogle(string $sUrlToSign, string $sClientId, string $sPrivateKey) : string
41
-    {
42
-        $aUrl = parse_url($sUrlToSign);
43
-        $aUrl['query'] .= '&client=' .$sClientId;
31
+	/**
32
+	 * get the URL with the signature for the Pro account of Google Map
33
+	 * 
34
+	 * @access public
35
+	 * @param unknown $sUrlToSign
36
+	 * @param unknown $sClientId
37
+	 * @param unknown $sPrivateKey
38
+	 * @return string
39
+	 */
40
+	public static function signUrlForGoogle(string $sUrlToSign, string $sClientId, string $sPrivateKey) : string
41
+	{
42
+		$aUrl = parse_url($sUrlToSign);
43
+		$aUrl['query'] .= '&client=' .$sClientId;
44 44
 
45
-        $aUrlToSign = $aUrl['path']."?".$aUrl['query'];
45
+		$aUrlToSign = $aUrl['path']."?".$aUrl['query'];
46 46
 
47
-        $decodedKey = base64_decode(str_replace(array('-', '_'), array('+', '/'), $sPrivateKey));
47
+		$decodedKey = base64_decode(str_replace(array('-', '_'), array('+', '/'), $sPrivateKey));
48 48
 
49
-        $sSignature = hash_hmac("sha1", $aUrlToSign, $decodedKey, true);
49
+		$sSignature = hash_hmac("sha1", $aUrlToSign, $decodedKey, true);
50 50
 
51
-        $sEncodedSignature = str_replace(array('+', '/'), array('-', '_'), base64_encode($sSignature));
51
+		$sEncodedSignature = str_replace(array('+', '/'), array('-', '_'), base64_encode($sSignature));
52 52
 
53
-        $sOriginalUrl = $aUrl['scheme']."://".$aUrl['host'].$aUrl['path'] . "?".$aUrl['query'];
53
+		$sOriginalUrl = $aUrl['scheme']."://".$aUrl['host'].$aUrl['path'] . "?".$aUrl['query'];
54 54
 
55
-        return $sOriginalUrl. '&signature='. $sEncodedSignature;
56
-    }
55
+		return $sOriginalUrl. '&signature='. $sEncodedSignature;
56
+	}
57 57
 }
Please login to merge, or discard this patch.
bundles/lib/Typescript.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
  */
31 31
 class Typescript
32 32
 {
33
-    /**
34
-     * @var string
35
-     */
36
-    const TYPESCRIPT_WINDOWS = TYPESCRIPT_WINDOWS;
33
+	/**
34
+	 * @var string
35
+	 */
36
+	const TYPESCRIPT_WINDOWS = TYPESCRIPT_WINDOWS;
37 37
     
38 38
 	/**
39 39
 	 * translate the content
@@ -44,21 +44,21 @@  discard block
 block discarded – undo
44 44
 	 */
45 45
 	public static function toJs(string $sFile) : string
46 46
 	{
47
-	    $aFile = pathinfo($sFile);
48
-	    $sFolder = uniqid();
47
+		$aFile = pathinfo($sFile);
48
+		$sFolder = uniqid();
49 49
 	    
50
-	    if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
50
+		if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
51 51
 	        
52
-	        $sCmd = self::TYPESCRIPT_WINDOWS." ".$sFile." --outDir ".__DIR__.'../../'.CACHE_DIR.$sFolder.'/';
53
-            $sContent = shell_exec($sCmd);
54
-	    }
55
-	    else {
52
+			$sCmd = self::TYPESCRIPT_WINDOWS." ".$sFile." --outDir ".__DIR__.'../../'.CACHE_DIR.$sFolder.'/';
53
+			$sContent = shell_exec($sCmd);
54
+		}
55
+		else {
56 56
 	       
57
-	        $sCmd = "tsc ".$sFile." --outDir ".__DIR__.'../../'.CACHE_DIR.$sFolder.'/';
58
-            $sContent = shell_exec($sCmd);
59
-	    }
57
+			$sCmd = "tsc ".$sFile." --outDir ".__DIR__.'../../'.CACHE_DIR.$sFolder.'/';
58
+			$sContent = shell_exec($sCmd);
59
+		}
60 60
 	    
61
-        header("content-type:text/javascript");
62
-        return file_get_contents(__DIR__.'../../'.CACHE_DIR.$sFolder.'/'.$aFile['filename'].'.js');
61
+		header("content-type:text/javascript");
62
+		return file_get_contents(__DIR__.'../../'.CACHE_DIR.$sFolder.'/'.$aFile['filename'].'.js');
63 63
 	}
64 64
 }
Please login to merge, or discard this patch.
bundles/src/plugins/common/Controller.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -46,20 +46,20 @@
 block discarded – undo
46 46
 		
47 47
 		$this->installDb = function()
48 48
 		{
49
-		    $oDb = Config::get('Db');
50
-		    $oTables = json_decode(file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.preg_replace('/^.*\\\\([a-zA-Z0-9]+)$/', '$1', get_called_class()).DIRECTORY_SEPARATOR.'conf'.DIRECTORY_SEPARATOR.'Db.conf'));
49
+			$oDb = Config::get('Db');
50
+			$oTables = json_decode(file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.preg_replace('/^.*\\\\([a-zA-Z0-9]+)$/', '$1', get_called_class()).DIRECTORY_SEPARATOR.'conf'.DIRECTORY_SEPARATOR.'Db.conf'));
51 51
 		    
52
-		    $oDb->configuration->tables = $oTables;
52
+			$oDb->configuration->tables = $oTables;
53 53
 		    
54
-    	    $aOptions = [
55
-	           "p" => CREATE_PORTAL,
56
-	           "c" => true,
57
-	           "e" => true,
58
-	           "b" => json_encode($oDb)
59
-    	    ];
54
+			$aOptions = [
55
+			   "p" => CREATE_PORTAL,
56
+			   "c" => true,
57
+			   "e" => true,
58
+			   "b" => json_encode($oDb)
59
+			];
60 60
     	    
61
-    	    $oEntity = new Entity;
62
-    	    $oEntity->runScaffolding($aOptions);
61
+			$oEntity = new Entity;
62
+			$oEntity->runScaffolding($aOptions);
63 63
 		};
64 64
 	}
65 65
 }
Please login to merge, or discard this patch.
bundles/src/Batch/app/Controller/Plugin.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -47,20 +47,20 @@  discard block
 block discarded – undo
47 47
 	 */
48 48
 	public function install(array $aOptions = array())
49 49
 	{
50
-	    $sFile = file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'conf'.DIRECTORY_SEPARATOR.'Plugins.conf');
51
-	    $aPlugins = json_decode($sFile);
50
+		$sFile = file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'conf'.DIRECTORY_SEPARATOR.'Plugins.conf');
51
+		$aPlugins = json_decode($sFile);
52 52
 	    
53
-	    if (isset($aOptions['p'])) {
53
+		if (isset($aOptions['p'])) {
54 54
 	        
55
-	        define('CREATE_PORTAL', $aOptions['p']);
56
-	    }
55
+			define('CREATE_PORTAL', $aOptions['p']);
56
+		}
57 57
 	    
58
-	    foreach ($aPlugins->list as $sPluginName) {
58
+		foreach ($aPlugins->list as $sPluginName) {
59 59
 	        
60
-	        $sClassName = 'Venus\src\plugins\\'.$sPluginName.'\Controller\\'.$sPluginName;
61
-	        $oPlugin = new $sClassName;
62
-	        $oPlugin->install($aOptions['p']);
63
-	    }
60
+			$sClassName = 'Venus\src\plugins\\'.$sPluginName.'\Controller\\'.$sPluginName;
61
+			$oPlugin = new $sClassName;
62
+			$oPlugin->install($aOptions['p']);
63
+		}
64 64
 	}
65 65
 
66 66
 	/**
@@ -73,23 +73,23 @@  discard block
 block discarded – undo
73 73
 	 */
74 74
 	public function create(array $aOptions = array())
75 75
 	{
76
-	    $sDefaultFolder = __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.$aOptions['n'];
77
-	    mkdir($sDefaultFolder, 0777, true);
78
-	    mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'conf', 0777, true);
79
-	    mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'Controller', 0777, true);
80
-	    mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'data', 0777, true);
81
-	    mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'i18n', 0777, true);
82
-	    mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'meta', 0777, true);
83
-	    mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'public', 0777, true);
84
-	    mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'public'.DIRECTORY_SEPARATOR.'css', 0777, true);
85
-	    mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'public'.DIRECTORY_SEPARATOR.'img', 0777, true);
86
-	    mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'public'.DIRECTORY_SEPARATOR.'js', 0777, true);
87
-	    mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'View', 0777, true);
76
+		$sDefaultFolder = __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.$aOptions['n'];
77
+		mkdir($sDefaultFolder, 0777, true);
78
+		mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'conf', 0777, true);
79
+		mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'Controller', 0777, true);
80
+		mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'data', 0777, true);
81
+		mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'i18n', 0777, true);
82
+		mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'meta', 0777, true);
83
+		mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'public', 0777, true);
84
+		mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'public'.DIRECTORY_SEPARATOR.'css', 0777, true);
85
+		mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'public'.DIRECTORY_SEPARATOR.'img', 0777, true);
86
+		mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'public'.DIRECTORY_SEPARATOR.'js', 0777, true);
87
+		mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'View', 0777, true);
88 88
 	    
89
-	    file_put_contents($sDefaultFolder.DIRECTORY_SEPARATOR.'conf'.DIRECTORY_SEPARATOR.'Db.conf', '{}');
90
-	    file_put_contents($sDefaultFolder.DIRECTORY_SEPARATOR.'conf'.DIRECTORY_SEPARATOR.'Plugin.conf', '{}');
89
+		file_put_contents($sDefaultFolder.DIRECTORY_SEPARATOR.'conf'.DIRECTORY_SEPARATOR.'Db.conf', '{}');
90
+		file_put_contents($sDefaultFolder.DIRECTORY_SEPARATOR.'conf'.DIRECTORY_SEPARATOR.'Plugin.conf', '{}');
91 91
 	    
92
-	    $sContent = "<?php
92
+		$sContent = "<?php
93 93
 
94 94
 /**
95 95
  * Controller of the plugin ".$aOptions['n']."
@@ -157,9 +157,9 @@  discard block
 block discarded – undo
157 157
     }
158 158
 }";
159 159
 	    
160
-	    file_put_contents($sDefaultFolder.DIRECTORY_SEPARATOR.'Controller'.DIRECTORY_SEPARATOR.$aOptions['n'].'.php', $sContent);
161
-	    mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'i18n'.DIRECTORY_SEPARATOR.'en_US'.DIRECTORY_SEPARATOR.'LC_MESSAGES', 0777, true);
162
-	    file_put_contents($sDefaultFolder.DIRECTORY_SEPARATOR.'meta'.DIRECTORY_SEPARATOR.'LICENSE.md', '');
163
-	    file_put_contents($sDefaultFolder.DIRECTORY_SEPARATOR.'meta'.DIRECTORY_SEPARATOR.'README.md', '');
160
+		file_put_contents($sDefaultFolder.DIRECTORY_SEPARATOR.'Controller'.DIRECTORY_SEPARATOR.$aOptions['n'].'.php', $sContent);
161
+		mkdir($sDefaultFolder.DIRECTORY_SEPARATOR.'i18n'.DIRECTORY_SEPARATOR.'en_US'.DIRECTORY_SEPARATOR.'LC_MESSAGES', 0777, true);
162
+		file_put_contents($sDefaultFolder.DIRECTORY_SEPARATOR.'meta'.DIRECTORY_SEPARATOR.'LICENSE.md', '');
163
+		file_put_contents($sDefaultFolder.DIRECTORY_SEPARATOR.'meta'.DIRECTORY_SEPARATOR.'README.md', '');
164 164
 	}
165 165
 }
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.
bundles/lib/ObjectOperation.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 	{
38 38
 		if ( is_object($mObject)) {
39 39
 			
40
-		    $mObject = (array) $mObject;
40
+			$mObject = (array) $mObject;
41 41
 		}
42 42
 
43 43
 
Please login to merge, or discard this patch.