Passed
Branch master (f5c5f5)
by Adrian
02:08
created
src/DB/DbConfig.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	private function __construct()
61 61
 	{
62 62
 		$vendorCfg = __DIR__ . '/../../../../../vendor-cfg/qpdb_db_config.php';
63
-		if(file_exists($vendorCfg))
63
+		if (file_exists($vendorCfg))
64 64
 			$this->dbConfig = require $vendorCfg;
65 65
 		else
66 66
 			$this->dbConfig = require __DIR__ . '/../../config/qpdb_db_config.php';
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	 * @param string $fileConfig
73 73
 	 * @return $this
74 74
 	 */
75
-	public function withFileConfig( $fileConfig )
75
+	public function withFileConfig($fileConfig)
76 76
 	{
77 77
 		$this->dbConfig = require $fileConfig;
78 78
 		$this->buildConfig();
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 
147 147
 	public function useTablePrefix()
148 148
 	{
149
-		if ( !empty( $this->dbConfig['use_table_prefix'] ) )
149
+		if (!empty($this->dbConfig['use_table_prefix']))
150 150
 			return $this->dbConfig['use_table_prefix'];
151 151
 
152 152
 		return false;
@@ -182,18 +182,18 @@  discard block
 block discarded – undo
182 182
 	private function readMasterDataConnect()
183 183
 	{
184 184
 
185
-		if ( !isset( $this->dbConfig['master_data_connect'][0] ) )
186
-			throw new DbException( 'Master data connect is missing', DbException::DB_ERROR_MASTER_DATA_CONNECTION_MISSING );
185
+		if (!isset($this->dbConfig['master_data_connect'][0]))
186
+			throw new DbException('Master data connect is missing', DbException::DB_ERROR_MASTER_DATA_CONNECTION_MISSING);
187 187
 
188 188
 		$dataConnection = $this->dbConfig['master_data_connect'];
189 189
 
190
-		if ( !$this->replicationEnable || count( $dataConnection ) == 1 ) {
190
+		if (!$this->replicationEnable || count($dataConnection) == 1) {
191 191
 			$this->masterDataConnect = $dataConnection[0];
192 192
 
193 193
 			return true;
194 194
 		}
195 195
 
196
-		shuffle( $dataConnection );
196
+		shuffle($dataConnection);
197 197
 		$this->masterDataConnect = $dataConnection[0];
198 198
 
199 199
 		return true;
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 	private function readSlaveDataConnect()
207 207
 	{
208 208
 
209
-		if ( !isset( $this->dbConfig['slave_data_connect'][0] ) ) {
209
+		if (!isset($this->dbConfig['slave_data_connect'][0])) {
210 210
 			$this->slaveDataConnect = $this->masterDataConnect;
211 211
 
212 212
 			return true;
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 
215 215
 		$dataConnection = $this->dbConfig['slave_data_connect'];
216 216
 
217
-		shuffle( $dataConnection );
217
+		shuffle($dataConnection);
218 218
 		$this->slaveDataConnect = $dataConnection[0];
219 219
 
220 220
 		return true;
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 	 */
226 226
 	public static function getInstance()
227 227
 	{
228
-		if ( null === self::$instance ) {
228
+		if (null === self::$instance) {
229 229
 			self::$instance = new self();
230 230
 		}
231 231
 
Please login to merge, or discard this patch.