Passed
Push — master ( ae3b0e...197bfe )
by Joe
03:05
created
src/Generic.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 	public $database = '';
20 20
 	public $user = '';
21 21
 	public $password = '';
22
-    public $port = '';
22
+	public $port = '';
23 23
 
24 24
 	/* public: configuration parameters */
25 25
 	public $autoStripslashes = false;
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 * @param string $password Optional The password to use
70 70
 	 * @param string $host Optional The hostname where the server is, or default to localhost
71 71
 	 * @param string $query Optional query to perform immediately
72
-     * @param string $port optional port for the connection
72
+	 * @param string $port optional port for the connection
73 73
 	 */
74 74
 	public function __construct($database = '', $user = '', $password = '', $host = 'localhost', $query = '', $port = '')
75 75
 	{
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 		$this->user = $user;
78 78
 		$this->password = $password;
79 79
 		$this->host = $host;
80
-        $this->port = $port;
80
+		$this->port = $port;
81 81
 		if ($query != '') {
82 82
 			$this->query($query);
83 83
 		}
Please login to merge, or discard this patch.
src/Mysqli/Db.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -69,12 +69,12 @@  discard block
 block discarded – undo
69 69
 		if ($user == '') {
70 70
 			$user = $this->user;
71 71
 		}
72
-        if ($password == '') {
73
-            $password = $this->password;
74
-        }
75
-        if ($port == '') {
76
-            $port = $this->port;
77
-        }
72
+		if ($password == '') {
73
+			$password = $this->password;
74
+		}
75
+		if ($port == '') {
76
+			$port = $this->port;
77
+		}
78 78
 		/* establish connection, select database */
79 79
 		if (!is_object($this->linkId)) {
80 80
 			$this->connectionAttempt++;
@@ -87,11 +87,11 @@  discard block
 block discarded – undo
87 87
 			}
88 88
 			$this->linkId = mysqli_init();
89 89
 			$this->linkId->options(MYSQLI_INIT_COMMAND, "SET NAMES {$this->characterSet} COLLATE {$this->collation}, COLLATION_CONNECTION = {$this->collation}, COLLATION_DATABASE = {$this->collation}");
90
-            if ($port != '') {
91
-                $this->linkId->real_connect($host, $user, $password, $database, $port);
92
-            } else {
93
-                $this->linkId->real_connect($host, $user, $password, $database);
94
-            }			
90
+			if ($port != '') {
91
+				$this->linkId->real_connect($host, $user, $password, $database, $port);
92
+			} else {
93
+				$this->linkId->real_connect($host, $user, $password, $database);
94
+			}			
95 95
 			$this->linkId->set_charset($this->characterSet);
96 96
 			if ($this->linkId->connect_errno) {
97 97
 				$this->halt("connect($host, $user, \$password) failed. ".$mysqli->connect_error);
@@ -246,18 +246,18 @@  discard block
 block discarded – undo
246 246
 				$this->connect();
247 247
 			}
248 248
 			$start = microtime(true);
249
-            $onlyRollback = true;
250
-            $fails = 0;
251
-            while ($fails < 10 && false === $this->queryId = @mysqli_query($this->linkId, $queryString, MYSQLI_STORE_RESULT)) {
252
-                $fails++; 
253
-                if (@mysqli_errno($this->linkId) == 3101)
254
-                    usleep(500000); // half a second
255
-                else
256
-                    $onlyRollback = false;
257
-            } 
258
-            if ($onlyRollback === true && false === $this->queryId) {
259
-                myadmin_log('myadmin', 'error', 'Got MySQLi 3101 Rollback Error '.$fails.' Times, Giving Up', __LINE__, __FILE__);
260
-            }
249
+			$onlyRollback = true;
250
+			$fails = 0;
251
+			while ($fails < 10 && false === $this->queryId = @mysqli_query($this->linkId, $queryString, MYSQLI_STORE_RESULT)) {
252
+				$fails++; 
253
+				if (@mysqli_errno($this->linkId) == 3101)
254
+					usleep(500000); // half a second
255
+				else
256
+					$onlyRollback = false;
257
+			} 
258
+			if ($onlyRollback === true && false === $this->queryId) {
259
+				myadmin_log('myadmin', 'error', 'Got MySQLi 3101 Rollback Error '.$fails.' Times, Giving Up', __LINE__, __FILE__);
260
+			}
261 261
  			$this->addLog($queryString, microtime(true) - $start, $line, $file);
262 262
 			$this->Row = 0;
263 263
 			$this->Errno = @mysqli_errno($this->linkId);
Please login to merge, or discard this patch.