Passed
Branch master (ef8f16)
by Adrian
03:08 queued 01:34
created
src/Dependencies/QueryHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 		foreach ( $brutArray as $value ) {
59 59
 			$value = trim( $value );
60 60
 			if ( '' !== $value )
61
-				$newArray[] = $value;
61
+				$newArray[ ] = $value;
62 62
 		}
63 63
 
64 64
 		return $newArray;
@@ -120,14 +120,14 @@  discard block
 block discarded – undo
120 120
 	public static function addBacktick( $string )
121 121
 	{
122 122
 		$string = str_replace( '`', '', $string );
123
-		$stringArrayBacktick = [];
123
+		$stringArrayBacktick = [ ];
124 124
 		$string = self::clearMultipleSpaces( $string );
125 125
 		$stringArray = explode( '.', $string );
126 126
 		foreach ( $stringArray as $part ) {
127 127
 			$part = self::clearMultipleSpaces( $part );
128 128
 			if ( empty( $part ) )
129 129
 				continue;
130
-			$stringArrayBacktick[] = '`' . $part . '`';
130
+			$stringArrayBacktick[ ] = '`' . $part . '`';
131 131
 		}
132 132
 
133 133
 		return implode( '.', $stringArrayBacktick );
Please login to merge, or discard this patch.
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
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 		while ( in_array( $instance, self::$usedInstanceIds ) ) {
145 145
 			$instance = QueryHelper::random( 5 );
146 146
 		}
147
-		self::$usedInstanceIds[] = $instance;
147
+		self::$usedInstanceIds[ ] = $instance;
148 148
 
149 149
 		return $instance;
150 150
 	}
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 			return true;
192 192
 
193 193
 		if ( $this->typeEL[ $name ] === self::ELEMENT_TYPE_ARRAY )
194
-			$this->syntaxEL[ $name ][] = $value;
194
+			$this->syntaxEL[ $name ][ ] = $value;
195 195
 		else
196 196
 			$this->syntaxEL[ $name ] = $value;
197 197
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 	 * @param string $search
239 239
 	 * @return string
240 240
 	 */
241
-	public function bindParamsExpression( $expression, array $params = [], $search = '?' )
241
+	public function bindParamsExpression( $expression, array $params = [ ], $search = '?' )
242 242
 	{
243 243
 		if ( !count( $params ) )
244 244
 			return $expression;
@@ -249,12 +249,12 @@  discard block
 block discarded – undo
249 249
 		$params = array_slice( $params, 0, substr_count( $expression, $search ) );
250 250
 
251 251
 		$i = 0;
252
-		$arrayReturn = [];
252
+		$arrayReturn = [ ];
253 253
 		$expressionToArray = explode( $search, $expression );
254 254
 
255 255
 		foreach ( $expressionToArray as $sub ) {
256
-			$arrayReturn[] = $sub;
257
-			$arrayReturn[] = array_key_exists( $i, $params ) ? $this->bindParam( 'exp', $params[ $i ] ) : '';
256
+			$arrayReturn[ ] = $sub;
257
+			$arrayReturn[ ] = array_key_exists( $i, $params ) ? $this->bindParam( 'exp', $params[ $i ] ) : '';
258 258
 			$i++;
259 259
 		}
260 260
 
Please login to merge, or discard this patch.
src/AbstractCruds/AbstractTableCrud.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	 * @return array|bool
61 61
 	 * @throws QueryException
62 62
 	 */
63
-	public function getRowById( $id, array $fields = [] )
63
+	public function getRowById( $id, array $fields = [ ] )
64 64
 	{
65 65
 		$conditions = $this->getPrimaryKeyConditions( $id );
66 66
 		$result = QueryBuild::select( $this->table )->fields( $fields );
@@ -137,14 +137,14 @@  discard block
 block discarded – undo
137 137
 			throw new QueryException( 'Order field is not defined' );
138 138
 
139 139
 		$query = /** @lang text */
140
-			"UPDATE `{$this->table}` SET `{$this->orderField}` = CASE `{$this->primary[0]}` \r\n";
140
+			"UPDATE `{$this->table}` SET `{$this->orderField}` = CASE `{$this->primary[ 0 ]}` \r\n";
141 141
 		foreach ( $updates_ord as $position => $id ) {
142 142
 			$pos = $position + 1;
143 143
 			$query .= " WHEN '$id' THEN '$pos' \r\n";
144 144
 		}
145 145
 		$query .= "ELSE `{$this->orderField}` END";
146 146
 
147
-		return DbService::getInstance()->query( $query, [] );
147
+		return DbService::getInstance()->query( $query, [ ] );
148 148
 	}
149 149
 
150 150
 
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 		if ( count( $this->primary ) !== count( $id ) )
162 162
 			throw new QueryException( 'Invalid primary key', QueryException::QUERY_CRUD_INVALID_PRIMARY );
163 163
 
164
-		$conditions = [];
164
+		$conditions = [ ];
165 165
 
166 166
 		foreach ( $this->primary as $index => $key )
167 167
 			$conditions[ $key ] = $id[ $index ];
Please login to merge, or discard this patch.