Passed
Branch master (ef8f16)
by Adrian
03:08 queued 01:34
created
src/Traits/Having.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 	 * @param string $glue
279 279
 	 * @return $this
280 280
 	 */
281
-	public function havingExpression( $whereString, array $bindParams = [], $glue = 'AND' )
281
+	public function havingExpression( $whereString, array $bindParams = [ ], $glue = 'AND' )
282 282
 	{
283 283
 		$whereString = $this->queryStructure->bindParamsExpression( $whereString, $bindParams );
284 284
 
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 	 * @param array $bindParams
291 291
 	 * @return $this
292 292
 	 */
293
-	public function orHavingExpression( $whereString, array $bindParams = [] )
293
+	public function orHavingExpression( $whereString, array $bindParams = [ ] )
294 294
 	{
295 295
 		$whereString = $this->queryStructure->bindParamsExpression( $whereString, $bindParams );
296 296
 
Please login to merge, or discard this patch.
src/DB/DbService.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	/**
47 47
 	 * @var array
48 48
 	 */
49
-	private $parameters = [];
49
+	private $parameters = [ ];
50 50
 
51 51
 	/**
52 52
 	 * @var string;
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 		$column = null;
126 126
 
127 127
 		foreach ( $Columns as $cells ) {
128
-			$column[] = $cells[ 0 ];
128
+			$column[ ] = $cells[ 0 ];
129 129
 		}
130 130
 
131 131
 		return $column;
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 	 * @param array $parameters
210 210
 	 * @throws DbException
211 211
 	 */
212
-	private function queryInit( $query, $parameters = [] )
212
+	private function queryInit( $query, $parameters = [ ] )
213 213
 	{
214 214
 		$this->lastStatement = self::getQueryStatement( $query );
215 215
 		$this->createPdoConnection();
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 			 * Prepare query
221 221
 			 */
222 222
 			$this->sQuery = $this->pdo->prepare( $query );
223
-			$this->prepareParams($parameters);
223
+			$this->prepareParams( $parameters );
224 224
 			$this->pdoBindValues();
225 225
 			$this->sQuery->execute();
226 226
 			if ( DbConfig::getInstance()->isEnableLogQueryDuration() ) {
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 			$this->bindMore( $parameters );
247 247
 		else
248 248
 			foreach ( $parameters as $key => $val )
249
-				$this->parameters[] = array( $key + 1, $val );
249
+				$this->parameters[ ] = array( $key + 1, $val );
250 250
 	}
251 251
 
252 252
 	private function pdoBindValues()
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 	 */
289 289
 	public function bind( $para, $value )
290 290
 	{
291
-		$this->parameters[] = [ ":" . $para, $value ];
291
+		$this->parameters[ ] = [ ":" . $para, $value ];
292 292
 	}
293 293
 
294 294
 	public function CloseConnection()
Please login to merge, or discard this patch.
src/DB/DbConfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
 	 * @param array $dbConfig
98 98
 	 * @return $this
99 99
 	 */
100
-	public function withConfigArray ( array $dbConfig )
100
+	public function withConfigArray( array $dbConfig )
101 101
 	{
102 102
 		$this->dbConfig = $dbConfig;
103 103
 		$this->buildConfig();
Please login to merge, or discard this patch.
src/Traits/SetFields.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 	 */
25 25
 	public function setField( $fieldName, $fieldValue )
26 26
 	{
27
-		$fieldName = $this->queryStructure->prepare($fieldName);
27
+		$fieldName = $this->queryStructure->prepare( $fieldName );
28 28
 		$valuePdoString = $this->queryStructure->bindParam( $fieldName, $fieldValue );
29 29
 		$this->queryStructure->setElement( QueryStructure::SET_FIELDS, "$fieldName = $valuePdoString" );
30 30
 
Please login to merge, or discard this patch.
src/Traits/WhereAndHavingBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
 		$pdoArray = array();
141 141
 		foreach ( $value as $item ) {
142
-			$pdoArray[] = $this->queryStructure->bindParam( 'a', $item );
142
+			$pdoArray[ ] = $this->queryStructure->bindParam( 'a', $item );
143 143
 		}
144 144
 		$body = [
145 145
 			$field,
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 			throw new QueryException( 'Invalid where array!', QueryException::QUERY_ERROR_WHERE_INVALID_PARAM_ARRAY );
217 217
 
218 218
 		if ( count( $param ) == 2 )
219
-			$param[] = '=';
219
+			$param[ ] = '=';
220 220
 
221 221
 		$param[ 0 ] = $this->queryStructure->prepare( $param[ 0 ] );
222 222
 		$param[ 2 ] = trim( strtoupper( $param[ 2 ] ) );
Please login to merge, or discard this patch.
src/Traits/OrderBy.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 	 * @return $this
25 25
 	 * @throws QueryException
26 26
 	 */
27
-	public function orderBy( $column, array $allowedColumns = [] )
27
+	public function orderBy( $column, array $allowedColumns = [ ] )
28 28
 	{
29
-		$column = $this->queryStructure->prepare($column);
29
+		$column = $this->queryStructure->prepare( $column );
30 30
 
31 31
 		if ( !$this->validateColumn( $column, $allowedColumns ) )
32 32
 			throw new QueryException( 'Invalid column name in ORDER BY clause', QueryException::QUERY_ERROR_INVALID_COLUMN_NAME );
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
 	 * @return $this
44 44
 	 * @throws QueryException
45 45
 	 */
46
-	public function orderByDesc( $column, array $allowedColumns = [] )
46
+	public function orderByDesc( $column, array $allowedColumns = [ ] )
47 47
 	{
48
-		$column = $this->queryStructure->prepare($column);
48
+		$column = $this->queryStructure->prepare( $column );
49 49
 
50 50
 		if ( !$this->validateColumn( $column, $allowedColumns ) )
51 51
 			throw new QueryException( 'Invalid column name in ORDER BY clause', QueryException::QUERY_ERROR_INVALID_COLUMN_NAME );
Please login to merge, or discard this patch.
src/Traits/GroupBy.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 	 * @return $this
25 25
 	 * @throws QueryException
26 26
 	 */
27
-	public function groupBy( $column, array $allowedColumns = [] )
27
+	public function groupBy( $column, array $allowedColumns = [ ] )
28 28
 	{
29
-		$column = $this->queryStructure->prepare($column);
29
+		$column = $this->queryStructure->prepare( $column );
30 30
 
31 31
 		if ( !$this->validateColumn( $column, $allowedColumns ) )
32 32
 			throw new QueryException( 'Invalid column name in GROUP BY clause', QueryException::QUERY_ERROR_INVALID_COLUMN_NAME );
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
 	 * @return $this
44 44
 	 * @throws QueryException
45 45
 	 */
46
-	public function groupByDesc( $column, array $allowedColumns = [] )
46
+	public function groupByDesc( $column, array $allowedColumns = [ ] )
47 47
 	{
48
-		$column = $this->queryStructure->prepare($column);
48
+		$column = $this->queryStructure->prepare( $column );
49 49
 
50 50
 		if ( !$this->validateColumn( $column, $allowedColumns ) )
51 51
 			throw new QueryException( 'Invalid column name in GROUP BY clause', QueryException::QUERY_ERROR_INVALID_COLUMN_NAME );
Please login to merge, or discard this patch.
src/Traits/TableValidation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 		if ( DbConfig::getInstance()->useTablePrefix() )
53 53
 			$table = str_ireplace( '::', DbConfig::getInstance()->getTablePrefix(), $table );
54 54
 
55
-		return QueryHelper::addBacktick($table);
55
+		return QueryHelper::addBacktick( $table );
56 56
 	}
57 57
 
58 58
 	private function validateTableSubQuery( $table )
Please login to merge, or discard this patch.
src/Traits/Limit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 		if ( !QueryHelper::isInteger( $limit ) )
32 32
 			throw new QueryException( 'Invalid Limit value', QueryException::QUERY_ERROR_INVALID_LIMIT );
33 33
 
34
-		$limit = $this->queryStructure->bindParam('lim', (int)$limit);
34
+		$limit = $this->queryStructure->bindParam( 'lim', ( int ) $limit );
35 35
 
36 36
 		if ( is_null( $offset ) ) {
37 37
 			$this->queryStructure->setElement( QueryStructure::LIMIT, $limit );
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 		if ( !QueryHelper::isInteger( $offset ) )
45 45
 			throw new QueryException( 'Invalid Limit offset', QueryException::QUERY_ERROR_INVALID_LIMIT_OFFSET );
46 46
 
47
-		$offset = $this->queryStructure->bindParam('ofs', (int)$offset);
47
+		$offset = $this->queryStructure->bindParam( 'ofs', ( int ) $offset );
48 48
 
49 49
 		$this->queryStructure->setElement( QueryStructure::LIMIT, $offset . ', ' . $limit );
50 50
 
Please login to merge, or discard this patch.