Completed
Branch master (07b0df)
by judicael
05:36 queued 02:38
created
bundles/lib/Vendor.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -60,23 +60,19 @@
 block discarded – undo
60 60
 	            str_replace('bundles'.DIRECTORY_SEPARATOR.'lib', CACHE_DIR, __DIR__), $mParam2);
61 61
 
62 62
 	        return $oApollina->addFunctionPath(__DIR__.DIRECTORY_SEPARATOR.'Functions', '\Venus\lib\Functions\\');
63
-	    }
64
-	    else if ($sVendorName === 'Attila\Orm') {
63
+	    } else if ($sVendorName === 'Attila\Orm') {
65 64
 
66 65
 	        $oDbConfig = Config::get('Db')->configuration;
67 66
 
68 67
 	        return new $sVendorName($oDbConfig->db, $oDbConfig->type, $oDbConfig->host, $oDbConfig->user, $oDbConfig->password, 
69 68
 	            $oDbConfig->db);
70
-	    }
71
-	    else if (isset($mParam) && isset($mParam2)) { 
69
+	    } else if (isset($mParam) && isset($mParam2)) { 
72 70
 	        
73 71
 	        return new $sVendorName($mParam, $mParam2);
74
-	    }
75
-	    else if (isset($mParam)) { 
72
+	    } else if (isset($mParam)) { 
76 73
 	        
77 74
 	        return new $sVendorName($mParam);
78
-	    }
79
-	    else { 
75
+	    } else { 
80 76
 	        
81 77
 	        return new $sVendorName;
82 78
 	    }
Please login to merge, or discard this patch.
bundles/lib/Validator/NotBlank.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,6 @@
 block discarded – undo
39 39
 	 */
40 40
 	public function validate(string $sValue = null) : bool
41 41
 	{
42
-		if (trim($sValue) != '') { return true; }
43
-		else { return false; }
42
+		if (trim($sValue) != '') { return true; } else { return false; }
44 43
 	}
45 44
 }
Please login to merge, or discard this patch.
bundles/lib/Di.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@  discard block
 block discarded – undo
56 56
 		if (isset(self::$_aSharedDependencyInjectorContener[md5($sNameOfDi)])) {
57 57
 
58 58
 			return self::$_aSharedDependencyInjectorContener[md5($sNameOfDi)];
59
-		}
60
-		else if (isset($this->_aDependencyInjectorContener[md5($sNameOfDi)])) {
59
+		} else if (isset($this->_aDependencyInjectorContener[md5($sNameOfDi)])) {
61 60
 		    
62 61
 		    return $this->_aDependencyInjectorContener[md5($sNameOfDi)];
63 62
 		}
@@ -76,8 +75,7 @@  discard block
 block discarded – undo
76 75
 	 */
77 76
 	public function set(string $sNameOfDi, callable $cFunction, bool $bShared = false) : Di
78 77
 	{
79
-	    if ($bShared === true) { self::$_aSharedDependencyInjectorContener[md5($sNameOfDi)] = $cFunction; }
80
-	    else { $this->_aDependencyInjectorContener[md5($sNameOfDi)] = $cFunction; }
78
+	    if ($bShared === true) { self::$_aSharedDependencyInjectorContener[md5($sNameOfDi)] = $cFunction; } else { $this->_aDependencyInjectorContener[md5($sNameOfDi)] = $cFunction; }
81 79
 		return $this;
82 80
 	}
83 81
 }
Please login to merge, or discard this patch.
bundles/lib/Upload.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -110,8 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
 		if ($this->_sExtension === null) { $this->setExtension($sExtension); }
112 112
 
113
-		if ($this->_sName) { $sName = $sPath.$this->_sName.'.'.$this->_sExtension; }
114
-		else { $sName = $sPath.md5(uniqid(rand(), true)).'.'.$this->_sExtension;}
113
+		if ($this->_sName) { $sName = $sPath.$this->_sName.'.'.$this->_sExtension; } else { $sName = $sPath.md5(uniqid(rand(), true)).'.'.$this->_sExtension;}
115 114
 
116 115
 		if ($this->_bProportion == true && ($this->_iWidth || $this->_iHeight)) {
117 116
 
@@ -129,8 +128,7 @@  discard block
 block discarded – undo
129 128
 			imagecopyresampled($rNewImgTrueColor , $rNewImage, 0, 0, $fX, $fY, $this->_iWidth, $this->_iHeight, $iWidth * $fRatio - $fX * 2, $iHeight * $fRatio - $fY * 2);
130 129
 
131 130
 			imagejpeg($rNewImgTrueColor , $sName, 100);
132
-		}
133
-		else {
131
+		} else {
134 132
 
135 133
 			$bResultat = move_uploaded_file($_FILES[$sFile]['tmp_name'], $sName);
136 134
 
Please login to merge, or discard this patch.
bundles/lib/Functions/Asset.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
     		    if (strstr($sTemplate, 'css/')) {
52 52
     			
53 53
     		        $sGetUrl .= $sTemplate.'&';
54
-    		    }
55
-    		    else if (strstr($sTemplate, 'js/')) {
54
+    		    } else if (strstr($sTemplate, 'js/')) {
56 55
     		        
57 56
     		        $sGetUrl .= $sTemplate.'&';
58 57
     		    }
Please login to merge, or discard this patch.
bundles/lib/Typescript.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
 	        
52 52
 	        $sCmd = self::TYPESCRIPT_WINDOWS." ".$sFile." --outDir ".__DIR__.'../../'.CACHE_DIR.$sFolder.'/';
53 53
             $sContent = shell_exec($sCmd);
54
-	    }
55
-	    else {
54
+	    } else {
56 55
 	       
57 56
 	        $sCmd = "tsc ".$sFile." --outDir ".__DIR__.'../../'.CACHE_DIR.$sFolder.'/';
58 57
             $sContent = shell_exec($sCmd);
Please login to merge, or discard this patch.
bundles/src/Batch/app/Controller/Server.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@
 block discarded – undo
60 60
             echo "\n\n";
61 61
             echo "        > Check realized on ".$options['a'];
62 62
             echo "\n\n";
63
-        }
64
-        else {
63
+        } else {
65 64
             echo "\n\n";
66 65
             echo Bash::setBackground("                                                                            ", 'red');
67 66
             echo Bash::setBackground("          [WARNING] A web server is not used                                ", 'red');
Please login to merge, or discard this patch.
bundles/src/Batch/app/Controller/Generator.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@  discard block
 block discarded – undo
50 50
 		/**
51 51
 		 * option -p [portail]
52 52
 		 */
53
-		if (isset($aOptions['p'])) { $sPortal = $aOptions['p']; }
54
-		else { $sPortal = 'Batch'; }
53
+		if (isset($aOptions['p'])) { $sPortal = $aOptions['p']; } else { $sPortal = 'Batch'; }
55 54
 
56 55
 		if (!preg_match('/^[a-zA-Z0-9]+$/', $sPortal)) {
57 56
 
@@ -67,16 +66,14 @@  discard block
 block discarded – undo
67 66
 
68 67
 			echo 'The batch can`t create public folders for '.$sPortal.'! Please check the rights.';
69 68
 			throw new \Exception('The batch can`t create public folders for '.$sPortal.'! Please check the rights.');
70
-		}
71
-		else {
69
+		} else {
72 70
 
73 71
 			if (!file_exists($sPrivatePath.'Controller')) {
74 72
 
75 73
 				mkdir($sPublicPath . 'css', 0777, true);
76 74
 				mkdir($sPublicPath . 'js', 0777, true);
77 75
 				mkdir($sPublicPath . 'img', 0777, true);
78
-			}
79
-			else {
76
+			} else {
80 77
 
81 78
 				echo 'The Project (public part) ' . $sPrivatePath . " exists\n";
82 79
 			}
@@ -86,8 +83,7 @@  discard block
 block discarded – undo
86 83
 
87 84
 			echo 'The batch can`t create private folders for '.$sPortal.'! Please check the rights.';
88 85
 			throw new \Exception('The batch can`t create private folders for '.$sPortal.'! Please check the rights.');
89
-		}
90
-		else {
86
+		} else {
91 87
 
92 88
 			if (!file_exists($sPrivatePath.'Controller')) {
93 89
 
@@ -97,8 +93,7 @@  discard block
 block discarded – undo
97 93
 				mkdir($sPrivatePath . 'View', 0777, true);
98 94
 				mkdir($sPrivatePath . 'conf', 0777, true);
99 95
 				mkdir($sPrivatePath . 'common', 0777, true);
100
-			}
101
-			else {
96
+			} else {
102 97
 
103 98
 				echo 'The Project (private part) ' . $sPrivatePath . " exists\n";
104 99
 			}
Please login to merge, or discard this patch.
bundles/conf/AutoLoad.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,7 @@
 block discarded – undo
48 48
 
49 49
         	require $sFileClassName;
50 50
         }
51
-    }
52
-    else {
51
+    } else {
53 52
 
54 53
         if (strstr($sFileName, 'Venus\\') && file_exists(preg_replace('#^(src/[a-zA-Z0-9_]+/)#', '$1app/', str_replace(['\\', '/'], '/', str_replace('conf', '', __DIR__).str_replace('Venus\\', '', $sFileName))))) {
55 54
 
Please login to merge, or discard this patch.