Passed
Push — master ( 7ff405...d0230e )
by Adrian
01:39
created
src/Dependencies/QueryStructure.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	/**
61 61
 	 * @var array
62 62
 	 */
63
-	private static $usedInstanceIds = [];
63
+	private static $usedInstanceIds = [ ];
64 64
 
65 65
 	/**
66 66
 	 * @var array
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 		while ( in_array( $instance, self::$usedInstanceIds ) ) {
133 133
 			$instance = QueryHelper::random( 7 );
134 134
 		}
135
-		self::$usedInstanceIds[] = $instance;
135
+		self::$usedInstanceIds[ ] = $instance;
136 136
 
137 137
 		return $instance;
138 138
 	}
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 			return true;
180 180
 
181 181
 		if ( $this->typeEL[ $name ] === self::ELEMENT_TYPE_ARRAY )
182
-			$this->syntaxEL[ $name ][] = $value;
182
+			$this->syntaxEL[ $name ][ ] = $value;
183 183
 		else
184 184
 			$this->syntaxEL[ $name ] = $value;
185 185
 
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 	 * @param string $search
242 242
 	 * @return string
243 243
 	 */
244
-	public function bindParamsExpression( $expression, array $params = [], $search = '?' )
244
+	public function bindParamsExpression( $expression, array $params = [ ], $search = '?' )
245 245
 	{
246 246
 		if ( !count( $params ) )
247 247
 			return $expression;
@@ -252,12 +252,12 @@  discard block
 block discarded – undo
252 252
 		$params = array_slice( $params, 0, substr_count( $expression, $search ) );
253 253
 
254 254
 		$i = 0;
255
-		$arrayReturn = [];
255
+		$arrayReturn = [ ];
256 256
 		$expressionToArray = explode( $search, $expression );
257 257
 
258 258
 		foreach ( $expressionToArray as $sub ) {
259
-			$arrayReturn[] = $sub;
260
-			$arrayReturn[] = array_key_exists( $i, $params ) ? $this->bindParam( 'exp', $params[ $i ] ) : '';
259
+			$arrayReturn[ ] = $sub;
260
+			$arrayReturn[ ] = array_key_exists( $i, $params ) ? $this->bindParam( 'exp', $params[ $i ] ) : '';
261 261
 			$i++;
262 262
 		}
263 263
 
Please login to merge, or discard this patch.
src/DB/DbService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	/**
44 44
 	 * @var array
45 45
 	 */
46
-	private $parameters = [];
46
+	private $parameters = [ ];
47 47
 
48 48
 
49 49
 	/**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		$column = null;
100 100
 
101 101
 		foreach ( $Columns as $cells ) {
102
-			$column[] = $cells[ 0 ];
102
+			$column[ ] = $cells[ 0 ];
103 103
 		}
104 104
 
105 105
 		return $column;
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	 * @param string $query
136 136
 	 * @param array $parameters
137 137
 	 */
138
-	private function queryInit( $query, $parameters = [] )
138
+	private function queryInit( $query, $parameters = [ ] )
139 139
 	{
140 140
 		$this->pdo = DbConnect::getInstance()->getConnection( self::getQueryStatement( $query ) );
141 141
 		$startQueryTime = microtime( true );
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 				$this->bindMore( $parameters );
155 155
 			else
156 156
 				foreach ( $parameters as $key => $val )
157
-					$this->parameters[] = array( $key + 1, $val );
157
+					$this->parameters[ ] = array( $key + 1, $val );
158 158
 
159 159
 			if ( count( $this->parameters ) ) {
160 160
 				foreach ( $this->parameters as $param => $value ) {
Please login to merge, or discard this patch.
src/Dependencies/QueryHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
 		foreach ( $brutArray as $value ) {
89 89
 			$value = trim( $value );
90 90
 			if ( '' !== $value )
91
-				$newArray[] = $value;
91
+				$newArray[ ] = $value;
92 92
 		}
93 93
 
94 94
 		return $newArray;
Please login to merge, or discard this patch.
src/Traits/Where.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 whereExpression( $whereString, array $bindParams = [], $glue = 'AND' )
281
+	public function whereExpression( $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 orWhereExpression( $whereString, array $bindParams = [] )
293
+	public function orWhereExpression( $whereString, array $bindParams = [ ] )
294 294
 	{
295 295
 		$whereString = $this->queryStructure->bindParamsExpression( $whereString, $bindParams );
296 296
 
Please login to merge, or discard this patch.
src/Traits/OrderBy.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  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 29
 		$column = trim( $column );
30 30
 
@@ -43,7 +43,7 @@  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 48
 		$column = trim( $column );
49 49
 
Please login to merge, or discard this patch.
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/Traits/WhereAndHavingBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 	{
119 119
 		$pdoArray = array();
120 120
 		foreach ( $value as $item ) {
121
-			$pdoArray[] = $this->queryStructure->bindParam( 'a', $item );
121
+			$pdoArray[ ] = $this->queryStructure->bindParam( 'a', $item );
122 122
 		}
123 123
 		$body = [
124 124
 			$field,
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 			throw new QueryException( 'Invalid where array!', QueryException::QUERY_ERROR_WHERE_INVALID_PARAM_ARRAY );
190 190
 
191 191
 		if ( count( $param ) == 2 )
192
-			$param[] = '=';
192
+			$param[ ] = '=';
193 193
 
194 194
 		$param[ 2 ] = trim( strtoupper( $param[ 2 ] ) );
195 195
 		$param[ 2 ] = QueryHelper::clearMultipleSpaces( $param[ 2 ] );
Please login to merge, or discard this patch.