Completed
Push — master ( 016764...50d24f )
by judicael
04:08
created
bundles/lib/PhpDoc.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,8 +88,7 @@
 block discarded – undo
88 88
 
89 89
 					$aParams['param'][$iIndex][] = $sValue;
90 90
 				}
91
-			}
92
-			else {
91
+			} else {
93 92
 
94 93
 				$aParams[$aOneMatch[1]] = array();
95 94
 
Please login to merge, or discard this patch.
bundles/lib/Session.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
   	 */
50 50
   	public function set(string $sName, $mValue) : Session
51 51
 	{
52
-    	$_SESSION[$sName] = $mValue;
53
-    	return $this;
52
+		$_SESSION[$sName] = $mValue;
53
+		return $this;
54 54
   	}
55 55
 
56 56
   	/**
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
   	 * @param  string $sName name of the session
85 85
   	 * @param  string $sValue value of this sesion var
86 86
   	 * @return \Venus\lib\Session
87
-	 */
87
+  	 */
88 88
  	 public function setFlashBag($sName, $sValue)
89 89
 	 {
90 90
   		if (!isset($_SESSION['flashbag'])) { $_SESSION['flashbag'] = array(); }
@@ -109,10 +109,10 @@  discard block
 block discarded – undo
109 109
 		    
110 110
 			$aParams = session_get_cookie_params();
111 111
 		    
112
-		    setcookie(session_name(), '', time() - 42000,
113
-		        $aParams["path"], $aParams["domain"],
114
-		        $aParams["secure"], $aParams["httponly"]
115
-		    );
112
+			setcookie(session_name(), '', time() - 42000,
113
+				$aParams["path"], $aParams["domain"],
114
+				$aParams["secure"], $aParams["httponly"]
115
+			);
116 116
 		}
117 117
 
118 118
 		session_destroy();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,8 +62,7 @@
 block discarded – undo
62 62
   	 */
63 63
   	public function get(string $sName)
64 64
 	{
65
-  		if (isset($_SESSION[$sName])) { return $_SESSION[$sName]; }
66
-  		else { return false; }
65
+  		if (isset($_SESSION[$sName])) { return $_SESSION[$sName]; } else { return false; }
67 66
   	}
68 67
 
69 68
   	/**
Please login to merge, or discard this patch.
bundles/lib/Mail.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 	 * the from of mail
40 40
 	 * @access private
41 41
 	 * @var    string
42
-	*/
42
+	 */
43 43
 	private $_sFrom = "[email protected]";
44 44
 
45 45
 	/**
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -174,34 +174,34 @@
 block discarded – undo
174 174
 	 */
175 175
 	public function send() : bool
176 176
 	{
177
-		$sHeaders = 'From: ' . $this->_sFrom . "\r\n";
177
+		$sHeaders = 'From: '.$this->_sFrom."\r\n";
178 178
 
179 179
 		if (empty($this->_aAttachments)) {
180 180
 			
181 181
 			if ($this->_sFormat == "HTML") {
182 182
 				
183
-				$sHeaders .= 'MIME-Version: 1.0' . "\r\n";
184
-				$sHeaders .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
183
+				$sHeaders .= 'MIME-Version: 1.0'."\r\n";
184
+				$sHeaders .= 'Content-type: text/html; charset=UTF-8'."\r\n";
185 185
 			}
186 186
 			
187 187
 			return mail(implode(',', $this->_aRecipient), $this->_sSubject, $this->_sMessage, $sHeaders);
188 188
 		}
189 189
 		else {
190 190
 
191
-			$sBoundary = "_" . md5(uniqid(rand()));
191
+			$sBoundary = "_".md5(uniqid(rand()));
192 192
 
193 193
 			$sAttached = "";
194 194
 
195 195
 			foreach ($this->_aAttachments as $aAttachment) {
196 196
 				
197 197
 				$sAttached_file = chunk_split(base64_encode($aAttachment["content"]));
198
-				$sAttached = "\n\n" . "--" . $sBoundary . "\nContent-Type: application; name=\"" . $aAttachment["name"] . "\"\r\nContent-Transfer-Encoding: base64\r\nContent-Disposition: attachment; filename=\"" . $aAttachment["name"] . "\"\r\n\n" . $sAttached_file . "--" . $sBoundary . "--";
198
+				$sAttached = "\n\n"."--".$sBoundary."\nContent-Type: application; name=\"".$aAttachment["name"]."\"\r\nContent-Transfer-Encoding: base64\r\nContent-Disposition: attachment; filename=\"".$aAttachment["name"]."\"\r\n\n".$sAttached_file."--".$sBoundary."--";
199 199
 			}
200 200
 
201
-			$sHeaders = 'From: ' . $this->_sFrom . "\r\n";
201
+			$sHeaders = 'From: '.$this->_sFrom."\r\n";
202 202
 			$sHeaders .= "MIME-Version: 1.0\r\nContent-Type: multipart/mixed; boundary=\"$sBoundary\"\r\n";
203 203
 
204
-			$sBody = "--" . $sBoundary . "\nContent-Type: " . ($this->_sFormat == "HTML" ? "text/html" : "text/plain") . "; charset=UTF-8\r\n\n" . $this->_sMessage . $sAttached;
204
+			$sBody = "--".$sBoundary."\nContent-Type: ".($this->_sFormat == "HTML" ? "text/html" : "text/plain")."; charset=UTF-8\r\n\n".$this->_sMessage.$sAttached;
205 205
 
206 206
 			return mail(implode(',', $this->_aRecipient), $this->_sSubject, $sBody, $sHeaders);
207 207
 		}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@
 block discarded – undo
50 50
 				$sKey = preg_replace("/^\\0(.*)\\0/", "", $sKey);
51 51
 				$aNew[$sKey] = self::object_to_array($mValues);
52 52
 			}
53
-		}
54
-		else {
53
+		} else {
55 54
 
56 55
 			$aNew = $mObject;
57 56
 		}
Please login to merge, or discard this patch.
bundles/lib/Benchmark.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
 	 */
82 82
 	public static function setPointInLog(string $sName = 'default')
83 83
 	{
84
-	    $oLogger = Debug::getInstance();
84
+		$oLogger = Debug::getInstance();
85 85
 		$oLogger->setLogger($oLogger);
86 86
 
87 87
 		$oLogger->getLogger()
88
-	         	->log('BENCHMARK: Time at this point '.(microtime(true) - self::$_fStart).' - '.$sName);
88
+			 	->log('BENCHMARK: Time at this point '.(microtime(true) - self::$_fStart).' - '.$sName);
89 89
 	}
90 90
 	
91 91
 	/**
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	 */
98 98
 	public function setLogger(LoggerInterface $logger)
99 99
 	{
100
-	    if ($this->_oLogger === null) { $this->_oLogger = $logger; }
100
+		if ($this->_oLogger === null) { $this->_oLogger = $logger; }
101 101
 	}
102 102
 
103 103
 	/**
Please login to merge, or discard this patch.
bundles/lib/Vendor.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
  */
31 31
 class Vendor
32 32
 {
33
-    /**
34
-     * cache of the vendor available
35
-     * 
36
-     * @access private
37
-     * @var    array
38
-     */
39
-    private static $_aCache = null;
33
+	/**
34
+	 * cache of the vendor available
35
+	 * 
36
+	 * @access private
37
+	 * @var    array
38
+	 */
39
+	private static $_aCache = null;
40 40
     
41 41
 	/**
42 42
 	 * constructor - factory
@@ -54,31 +54,31 @@  discard block
 block discarded – undo
54 54
 
55 55
 	public static function getVendor(string $sVendorName, $mParam = null, $mParam2 = null)
56 56
 	{
57
-	    if ($sVendorName === 'Apollina\Template') { 
57
+		if ($sVendorName === 'Apollina\Template') { 
58 58
 
59
-	        $oApollina = new $sVendorName($mParam, str_replace('lib', '', __DIR__), 
60
-	            str_replace('bundles'.DIRECTORY_SEPARATOR.'lib', CACHE_DIR, __DIR__), $mParam2);
59
+			$oApollina = new $sVendorName($mParam, str_replace('lib', '', __DIR__), 
60
+				str_replace('bundles'.DIRECTORY_SEPARATOR.'lib', CACHE_DIR, __DIR__), $mParam2);
61 61
 
62
-	        return $oApollina->addFunctionPath(__DIR__.DIRECTORY_SEPARATOR.'Functions', '\Venus\lib\Functions\\');
63
-	    }
64
-	    else if ($sVendorName === 'Attila\Orm') {
62
+			return $oApollina->addFunctionPath(__DIR__.DIRECTORY_SEPARATOR.'Functions', '\Venus\lib\Functions\\');
63
+		}
64
+		else if ($sVendorName === 'Attila\Orm') {
65 65
 
66
-	        $oDbConfig = Config::get('Db')->configuration;
66
+			$oDbConfig = Config::get('Db')->configuration;
67 67
 
68
-	        return new $sVendorName($oDbConfig->db, $oDbConfig->type, $oDbConfig->host, $oDbConfig->user, $oDbConfig->password, 
69
-	            $oDbConfig->db);
70
-	    }
71
-	    else if (isset($mParam) && isset($mParam2)) { 
68
+			return new $sVendorName($oDbConfig->db, $oDbConfig->type, $oDbConfig->host, $oDbConfig->user, $oDbConfig->password, 
69
+				$oDbConfig->db);
70
+		}
71
+		else if (isset($mParam) && isset($mParam2)) { 
72 72
 	        
73
-	        return new $sVendorName($mParam, $mParam2);
74
-	    }
75
-	    else if (isset($mParam)) { 
73
+			return new $sVendorName($mParam, $mParam2);
74
+		}
75
+		else if (isset($mParam)) { 
76 76
 	        
77
-	        return new $sVendorName($mParam);
78
-	    }
79
-	    else { 
77
+			return new $sVendorName($mParam);
78
+		}
79
+		else { 
80 80
 	        
81
-	        return new $sVendorName;
82
-	    }
81
+			return new $sVendorName;
82
+		}
83 83
 	}
84 84
 }
Please login to merge, or discard this 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/Type.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -30,41 +30,41 @@
 block discarded – undo
30 30
  */
31 31
 class Type extends Common
32 32
 {
33
-    /**
34
-     * type
35
-     * @var type
36
-     */
37
-    private $_sType = '';
33
+	/**
34
+	 * type
35
+	 * @var type
36
+	 */
37
+	private $_sType = '';
38 38
     
39
-    /**
40
-     * constructor
41
-     *
42
-     * @access public
43
-     * @param  string $sType type
44
-     * @return Type
45
-     */
46
-    public function __construct(string $sType)
47
-    {
48
-        $this->_sType = $sType;
49
-    }
39
+	/**
40
+	 * constructor
41
+	 *
42
+	 * @access public
43
+	 * @param  string $sType type
44
+	 * @return Type
45
+	 */
46
+	public function __construct(string $sType)
47
+	{
48
+		$this->_sType = $sType;
49
+	}
50 50
     
51
-    /**
52
-     * validate the Type
53
-     *
54
-     * @access public
55
-     * @param  string $sValue
56
-     * @return bool
57
-     */
58
-    public function validate(string $sValue = null) : bool
59
-    {
60
-        if ($this->_sType == 'DateTime') {
51
+	/**
52
+	 * validate the Type
53
+	 *
54
+	 * @access public
55
+	 * @param  string $sValue
56
+	 * @return bool
57
+	 */
58
+	public function validate(string $sValue = null) : bool
59
+	{
60
+		if ($this->_sType == 'DateTime') {
61 61
             
62
-            if (preg_match('#^[0-9]{4}/[0-9]{2}/[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}#', $sValue)) {
62
+			if (preg_match('#^[0-9]{4}/[0-9]{2}/[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}#', $sValue)) {
63 63
                 
64
-                return true;
65
-            }
66
-        }
64
+				return true;
65
+			}
66
+		}
67 67
         
68
-        return false;
69
-    }
68
+		return false;
69
+	}
70 70
 }
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 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 		}
60 60
 		else if (isset($this->_aDependencyInjectorContener[md5($sNameOfDi)])) {
61 61
 		    
62
-		    return $this->_aDependencyInjectorContener[md5($sNameOfDi)];
62
+			return $this->_aDependencyInjectorContener[md5($sNameOfDi)];
63 63
 		}
64 64
 
65 65
 		return false;
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
 	 */
77 77
 	public function set(string $sNameOfDi, callable $cFunction, bool $bShared = false) : Di
78 78
 	{
79
-	    if ($bShared === true) { self::$_aSharedDependencyInjectorContener[md5($sNameOfDi)] = $cFunction; }
80
-	    else { $this->_aDependencyInjectorContener[md5($sNameOfDi)] = $cFunction; }
79
+		if ($bShared === true) { self::$_aSharedDependencyInjectorContener[md5($sNameOfDi)] = $cFunction; }
80
+		else { $this->_aDependencyInjectorContener[md5($sNameOfDi)] = $cFunction; }
81 81
 		return $this;
82 82
 	}
83 83
 }
Please login to merge, or discard this 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/Log/LoggerAwareInterface.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@
 block discarded – undo
7 7
  */
8 8
 interface LoggerAwareInterface
9 9
 {
10
-    /**
11
-     * Sets a logger instance on the object
12
-     *
13
-     * @param LoggerInterface $logger
14
-     * @return null
15
-     */
16
-    public function setLogger(LoggerInterface $logger);
10
+	/**
11
+	 * Sets a logger instance on the object
12
+	 *
13
+	 * @param LoggerInterface $logger
14
+	 * @return null
15
+	 */
16
+	public function setLogger(LoggerInterface $logger);
17 17
 }
Please login to merge, or discard this patch.