Passed
Branch master (c939c5)
by Adrian
01:50
created
src/Dependencies/QueryHelper.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@  discard block
 block discarded – undo
15 15
 	 * @param string $string
16 16
 	 * @return mixed|string
17 17
 	 */
18
-	public static function clearMultipleSpaces( $string = '' )
18
+	public static function clearMultipleSpaces($string = '')
19 19
 	{
20
-		$string = preg_replace( '/\s+/', ' ', $string );
21
-		$string = trim( $string );
20
+		$string = preg_replace('/\s+/', ' ', $string);
21
+		$string = trim($string);
22 22
 
23 23
 		return $string;
24 24
 	}
@@ -27,11 +27,11 @@  discard block
 block discarded – undo
27 27
 	 * @param $val
28 28
 	 * @return bool
29 29
 	 */
30
-	public static function isInteger( $val )
30
+	public static function isInteger($val)
31 31
 	{
32
-		$val = trim( $val );
32
+		$val = trim($val);
33 33
 
34
-		return is_numeric( $val ) && floor( $val ) == $val;
34
+		return is_numeric($val) && floor($val) == $val;
35 35
 	}
36 36
 
37 37
 	/**
@@ -39,34 +39,34 @@  discard block
 block discarded – undo
39 39
 	 * @return bool
40 40
 	 * @i
41 41
 	 */
42
-	public static function isDecimal( $val )
42
+	public static function isDecimal($val)
43 43
 	{
44
-		$val = trim( $val );
44
+		$val = trim($val);
45 45
 
46
-		return is_numeric( $val ) && floor( $val ) != $val;
46
+		return is_numeric($val) && floor($val) != $val;
47 47
 	}
48 48
 
49
-	public static function isValidOrderBy( $order_by_parameter )
49
+	public static function isValidOrderBy($order_by_parameter)
50 50
 	{
51 51
 
52
-		$columns = array( 'first_name', 'last_name', 'zip', 'created_at' );
52
+		$columns = array('first_name', 'last_name', 'zip', 'created_at');
53 53
 
54
-		$parts = preg_split( "/[\s,]+/", $order_by_parameter );
54
+		$parts = preg_split("/[\s,]+/", $order_by_parameter);
55 55
 
56
-		foreach ( $parts as $part ) {
57
-			$subparts = preg_split( "/\s+/", $part );
56
+		foreach ($parts as $part) {
57
+			$subparts = preg_split("/\s+/", $part);
58 58
 
59
-			if ( count( $subparts ) < 0 || count( $subparts ) > 2 ) {
59
+			if (count($subparts) < 0 || count($subparts) > 2) {
60 60
 				// Too many or too few parts.
61 61
 				return false;
62 62
 			}
63 63
 
64
-			if ( !in_array( $subparts[0], $columns ) ) {
64
+			if (!in_array($subparts[0], $columns)) {
65 65
 				// Column name is invalid.
66 66
 				return false;
67 67
 			}
68 68
 
69
-			if ( count( $subparts ) == 2 && !in_array( strtoupper( $subparts[1] ), array( 'ASC', 'DESC' ) ) ) {
69
+			if (count($subparts) == 2 && !in_array(strtoupper($subparts[1]), array('ASC', 'DESC'))) {
70 70
 				// ASC or DESC is invalid
71 71
 				return false;
72 72
 			}
@@ -81,23 +81,23 @@  discard block
 block discarded – undo
81 81
 	 * @param string $delimiter
82 82
 	 * @return array
83 83
 	 */
84
-	public static function explode( $string, $delimiter = ',' )
84
+	public static function explode($string, $delimiter = ',')
85 85
 	{
86
-		$brutArray = explode( $delimiter, $string );
86
+		$brutArray = explode($delimiter, $string);
87 87
 		$newArray = array();
88
-		foreach ( $brutArray as $value ) {
89
-			$value = trim( $value );
90
-			if ( '' !== $value ) $newArray[] = $value;
88
+		foreach ($brutArray as $value) {
89
+			$value = trim($value);
90
+			if ('' !== $value) $newArray[] = $value;
91 91
 		}
92 92
 
93 93
 		return $newArray;
94 94
 	}
95 95
 
96
-	public static function alphaNum( $string )
96
+	public static function alphaNum($string)
97 97
 	{
98
-		$string = preg_replace( "/[^a-zA-Z0-9 _,]+/", "", $string );
98
+		$string = preg_replace("/[^a-zA-Z0-9 _,]+/", "", $string);
99 99
 
100
-		return self::clearMultipleSpaces( $string );
100
+		return self::clearMultipleSpaces($string);
101 101
 	}
102 102
 
103 103
 	/**
@@ -105,12 +105,12 @@  discard block
 block discarded – undo
105 105
 	 * @param string $delimiter
106 106
 	 * @return string
107 107
 	 */
108
-	public static function implode( array $array, $delimiter = ',' )
108
+	public static function implode(array $array, $delimiter = ',')
109 109
 	{
110
-		$string = implode( $delimiter, $array );
111
-		$string = trim( $string );
112
-		$string = trim( $string, trim( $delimiter ) );
113
-		$string = trim( $string );
110
+		$string = implode($delimiter, $array);
111
+		$string = trim($string);
112
+		$string = trim($string, trim($delimiter));
113
+		$string = trim($string);
114 114
 
115 115
 		return $string;
116 116
 	}
@@ -119,36 +119,36 @@  discard block
 block discarded – undo
119 119
 	 * @param $string
120 120
 	 * @return mixed|string
121 121
 	 */
122
-	public static function clearQuotes( $string )
122
+	public static function clearQuotes($string)
123 123
 	{
124
-		$search = array( '"', "'" );
124
+		$search = array('"', "'");
125 125
 		$replace = '';
126
-		$string = str_replace( $search, $replace, $string );
126
+		$string = str_replace($search, $replace, $string);
127 127
 
128
-		return self::clearMultipleSpaces( $string );
128
+		return self::clearMultipleSpaces($string);
129 129
 	}
130 130
 
131 131
 	/**
132 132
 	 * @param int $length
133 133
 	 * @return string
134 134
 	 */
135
-	public static function random( $length = 5 )
135
+	public static function random($length = 5)
136 136
 	{
137 137
 		$characters = 'abcdefghijklmnopqrstuvwxyz';
138
-		$charactersLength = strlen( $characters );
138
+		$charactersLength = strlen($characters);
139 139
 		$randomString = '';
140
-		for ( $i = 0; $i < $length; $i++ )
141
-			$randomString .= $characters[ rand( 0, $charactersLength - 1 ) ];
140
+		for ($i = 0; $i < $length; $i++)
141
+			$randomString .= $characters[rand(0, $charactersLength - 1)];
142 142
 
143
-		return str_shuffle( $randomString );
143
+		return str_shuffle($randomString);
144 144
 	}
145 145
 
146
-	public static function limitString( $rowCount, $offset = null )
146
+	public static function limitString($rowCount, $offset = null)
147 147
 	{
148
-		$rowCount = intval( $rowCount );
149
-		if ( is_null( $offset ) )
148
+		$rowCount = intval($rowCount);
149
+		if (is_null($offset))
150 150
 			return $rowCount;
151
-		$offset = intval( $offset );
151
+		$offset = intval($offset);
152 152
 
153 153
 		return "$offset, $rowCount";
154 154
 	}
Please login to merge, or discard this patch.
src/Dependencies/QueryStructure.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 	{
86 86
 		$this->syntaxEL = $this->init();
87 87
 
88
-		foreach ( $this->syntaxEL as $name => $value )
89
-			$this->typeEL[ $name ] = gettype( $value );
88
+		foreach ($this->syntaxEL as $name => $value)
89
+			$this->typeEL[$name] = gettype($value);
90 90
 
91 91
 	}
92 92
 
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
 
129 129
 	private function makeStatementInstance()
130 130
 	{
131
-		$instance = QueryHelper::random( 5 );
132
-		while ( in_array( $instance, self::$usedInstanceIds ) ) {
133
-			$instance = QueryHelper::random( 7 );
131
+		$instance = QueryHelper::random(5);
132
+		while (in_array($instance, self::$usedInstanceIds)) {
133
+			$instance = QueryHelper::random(7);
134 134
 		}
135 135
 		self::$usedInstanceIds[] = $instance;
136 136
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 	/**
159 159
 	 * @param $elements
160 160
 	 */
161
-	public function setAllElements( $elements )
161
+	public function setAllElements($elements)
162 162
 	{
163 163
 		$this->syntaxEL = $elements;
164 164
 	}
@@ -170,18 +170,18 @@  discard block
 block discarded – undo
170 170
 	 * @return bool
171 171
 	 * @throws QueryException
172 172
 	 */
173
-	public function setElement( $name, $value )
173
+	public function setElement($name, $value)
174 174
 	{
175
-		if ( !array_key_exists( $name, $this->syntaxEL ) )
176
-			throw new QueryException( 'Invalid Query property', QueryException::QUERY_ERROR_ELEMENT_NOT_FOUND );
175
+		if (!array_key_exists($name, $this->syntaxEL))
176
+			throw new QueryException('Invalid Query property', QueryException::QUERY_ERROR_ELEMENT_NOT_FOUND);
177 177
 
178
-		if ( $name == self::TABLE && is_a( $value, QueryStatement::class ) )
178
+		if ($name == self::TABLE && is_a($value, QueryStatement::class))
179 179
 			return true;
180 180
 
181
-		if ( $this->typeEL[ $name ] === self::ELEMENT_TYPE_ARRAY )
182
-			$this->syntaxEL[ $name ][] = $value;
181
+		if ($this->typeEL[$name] === self::ELEMENT_TYPE_ARRAY)
182
+			$this->syntaxEL[$name][] = $value;
183 183
 		else
184
-			$this->syntaxEL[ $name ] = $value;
184
+			$this->syntaxEL[$name] = $value;
185 185
 
186 186
 		return true;
187 187
 	}
@@ -192,12 +192,12 @@  discard block
 block discarded – undo
192 192
 	 * @param $elementValue
193 193
 	 * @throws QueryException
194 194
 	 */
195
-	public function replaceElement( $elementName, $elementValue )
195
+	public function replaceElement($elementName, $elementValue)
196 196
 	{
197
-		if ( !array_key_exists( $elementName, $this->syntaxEL ) )
198
-			throw new QueryException( 'Invalid Query property', QueryException::QUERY_ERROR_ELEMENT_NOT_FOUND );
197
+		if (!array_key_exists($elementName, $this->syntaxEL))
198
+			throw new QueryException('Invalid Query property', QueryException::QUERY_ERROR_ELEMENT_NOT_FOUND);
199 199
 
200
-		$this->syntaxEL[ $elementName ] = $elementValue;
200
+		$this->syntaxEL[$elementName] = $elementValue;
201 201
 	}
202 202
 
203 203
 
@@ -205,9 +205,9 @@  discard block
 block discarded – undo
205 205
 	 * @param string $name
206 206
 	 * @return mixed
207 207
 	 */
208
-	public function getElement( $name )
208
+	public function getElement($name)
209 209
 	{
210
-		return $this->syntaxEL[ $name ];
210
+		return $this->syntaxEL[$name];
211 211
 	}
212 212
 
213 213
 
@@ -215,9 +215,9 @@  discard block
 block discarded – undo
215 215
 	 * @param $name
216 216
 	 * @param $value
217 217
 	 */
218
-	public function setParams( $name, $value )
218
+	public function setParams($name, $value)
219 219
 	{
220
-		$this->syntaxEL[ QueryStructure::BIND_PARAMS ][ $name ] = $value;
220
+		$this->syntaxEL[QueryStructure::BIND_PARAMS][$name] = $value;
221 221
 	}
222 222
 
223 223
 
@@ -226,10 +226,10 @@  discard block
 block discarded – undo
226 226
 	 * @param $value
227 227
 	 * @return string
228 228
 	 */
229
-	public function bindParam( $name, $value )
229
+	public function bindParam($name, $value)
230 230
 	{
231
-		$pdoName = $this->index( $name );
232
-		$this->syntaxEL[ QueryStructure::BIND_PARAMS ][ $pdoName ] = $value;
231
+		$pdoName = $this->index($name);
232
+		$this->syntaxEL[QueryStructure::BIND_PARAMS][$pdoName] = $value;
233 233
 
234 234
 		return ':' . $pdoName;
235 235
 	}
@@ -241,27 +241,27 @@  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
-		if ( !count( $params ) )
246
+		if (!count($params))
247 247
 			return $expression;
248 248
 
249
-		if ( strpos( $expression, $search ) === false )
249
+		if (strpos($expression, $search) === false)
250 250
 			return $expression;
251 251
 
252
-		$params = array_slice( $params, 0, substr_count( $expression, $search ) );
252
+		$params = array_slice($params, 0, substr_count($expression, $search));
253 253
 
254 254
 		$i = 0;
255 255
 		$arrayReturn = [];
256
-		$expressionToArray = explode( $search, $expression );
256
+		$expressionToArray = explode($search, $expression);
257 257
 
258
-		foreach ( $expressionToArray as $sub ) {
258
+		foreach ($expressionToArray as $sub) {
259 259
 			$arrayReturn[] = $sub;
260
-			$arrayReturn[] = array_key_exists( $i, $params ) ? $this->bindParam( 'exp', $params[ $i ] ) : '';
260
+			$arrayReturn[] = array_key_exists($i, $params) ? $this->bindParam('exp', $params[$i]) : '';
261 261
 			$i++;
262 262
 		}
263 263
 
264
-		return implode( '', $arrayReturn );
264
+		return implode('', $arrayReturn);
265 265
 	}
266 266
 
267 267
 
@@ -269,9 +269,9 @@  discard block
 block discarded – undo
269 269
 	 * @param string $fieldName
270 270
 	 * @return string
271 271
 	 */
272
-	public function index( $fieldName = '' )
272
+	public function index($fieldName = '')
273 273
 	{
274
-		return trim( $fieldName ) . '_' . $this->syntaxEL[ self::INSTANCE ] . '_' . ++$this->counter . 'i';
274
+		return trim($fieldName) . '_' . $this->syntaxEL[self::INSTANCE] . '_' . ++$this->counter . 'i';
275 275
 	}
276 276
 
277 277
 }
278 278
\ No newline at end of file
Please login to merge, or discard this patch.
src/Dependencies/QueryTimer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
 	public function __construct()
25 25
 	{
26
-		$this->queryStart = microtime( true );
26
+		$this->queryStart = microtime(true);
27 27
 	}
28 28
 
29 29
 	/**
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	 */
32 32
 	public function getDuration()
33 33
 	{
34
-		$this->queryEnd = microtime( true );
34
+		$this->queryEnd = microtime(true);
35 35
 
36 36
 		return $this->queryEnd - $this->queryStart;
37 37
 	}
Please login to merge, or discard this patch.
src/QueryBuild.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	 * QueryBuild constructor.
27 27
 	 * @param $queryType
28 28
 	 */
29
-	protected function __construct( $queryType )
29
+	protected function __construct($queryType)
30 30
 	{
31 31
 		$this->queryType = $queryType;
32 32
 	}
@@ -35,45 +35,45 @@  discard block
 block discarded – undo
35 35
 	 * @param $table
36 36
 	 * @return QuerySelect
37 37
 	 */
38
-	public static function select( $table )
38
+	public static function select($table)
39 39
 	{
40
-		return new QuerySelect( new QueryBuild( 0 ), $table );
40
+		return new QuerySelect(new QueryBuild(0), $table);
41 41
 	}
42 42
 
43 43
 	/**
44 44
 	 * @param $table
45 45
 	 * @return QueryUpdate
46 46
 	 */
47
-	public static function update( $table )
47
+	public static function update($table)
48 48
 	{
49
-		return new QueryUpdate( new QueryBuild( 0 ), $table );
49
+		return new QueryUpdate(new QueryBuild(0), $table);
50 50
 	}
51 51
 
52 52
 	/**
53 53
 	 * @param $table
54 54
 	 * @return QueryInsert
55 55
 	 */
56
-	public static function insert( $table )
56
+	public static function insert($table)
57 57
 	{
58
-		return new QueryInsert( new QueryBuild( 0 ), $table );
58
+		return new QueryInsert(new QueryBuild(0), $table);
59 59
 	}
60 60
 
61 61
 	/**
62 62
 	 * @param $table
63 63
 	 * @return QueryDelete
64 64
 	 */
65
-	public static function delete( $table )
65
+	public static function delete($table)
66 66
 	{
67
-		return new QueryDelete( new QueryBuild( 0 ), $table );
67
+		return new QueryDelete(new QueryBuild(0), $table);
68 68
 	}
69 69
 
70 70
 	/**
71 71
 	 * @param $query
72 72
 	 * @return QueryCustom
73 73
 	 */
74
-	public static function query( $query )
74
+	public static function query($query)
75 75
 	{
76
-		return new QueryCustom( new QueryBuild( 1 ), $query );
76
+		return new QueryCustom(new QueryBuild(1), $query);
77 77
 	}
78 78
 
79 79
 	/**
Please login to merge, or discard this patch.
src/Statements/QueryUpdate.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -39,12 +39,12 @@  discard block
 block discarded – undo
39 39
 	 * @param QueryBuild $queryBuild
40 40
 	 * @param null $table
41 41
 	 */
42
-	public function __construct( QueryBuild $queryBuild, $table = null )
42
+	public function __construct(QueryBuild $queryBuild, $table = null)
43 43
 	{
44
-		parent::__construct( $queryBuild, $table );
44
+		parent::__construct($queryBuild, $table);
45 45
 	}
46 46
 
47
-	public function getSyntax( $replacement = self::REPLACEMENT_NONE )
47
+	public function getSyntax($replacement = self::REPLACEMENT_NONE)
48 48
 	{
49 49
 
50 50
 		$syntax = array();
@@ -62,17 +62,17 @@  discard block
 block discarded – undo
62 62
 		/**
63 63
 		 * PRIORITY
64 64
 		 */
65
-		$syntax[] = $this->queryStructure->getElement( QueryStructure::PRIORITY );
65
+		$syntax[] = $this->queryStructure->getElement(QueryStructure::PRIORITY);
66 66
 
67 67
 		/**
68 68
 		 * IGNORE clause
69 69
 		 */
70
-		$syntax[] = $this->queryStructure->getElement( QueryStructure::IGNORE ) ? 'IGNORE' : '';
70
+		$syntax[] = $this->queryStructure->getElement(QueryStructure::IGNORE) ? 'IGNORE' : '';
71 71
 
72 72
 		/**
73 73
 		 * TABLE update
74 74
 		 */
75
-		$syntax[] = $this->queryStructure->getElement( QueryStructure::TABLE );
75
+		$syntax[] = $this->queryStructure->getElement(QueryStructure::TABLE);
76 76
 
77 77
 		/**
78 78
 		 * FIELDS update
@@ -94,9 +94,9 @@  discard block
 block discarded – undo
94 94
 		 */
95 95
 		$syntax[] = $this->getLimitSyntax();
96 96
 
97
-		$syntax = implode( ' ', $syntax );
97
+		$syntax = implode(' ', $syntax);
98 98
 
99
-		return $this->getSyntaxReplace( $syntax, $replacement );
99
+		return $this->getSyntaxReplace($syntax, $replacement);
100 100
 
101 101
 	}
102 102
 
@@ -108,14 +108,14 @@  discard block
 block discarded – undo
108 108
 	{
109 109
 
110 110
 		if (
111
-			$this->queryStructure->getElement( ( QueryStructure::WHERE_TRIGGER ) ) &&
112
-			!count( $this->queryStructure->getElement( QueryStructure::WHERE ) )
111
+			$this->queryStructure->getElement((QueryStructure::WHERE_TRIGGER)) &&
112
+			!count($this->queryStructure->getElement(QueryStructure::WHERE))
113 113
 		)
114
-			throw new QueryException( 'Where clause is required for this statement!', QueryException::QUERY_ERROR_DELETE_NOT_FILTER );
114
+			throw new QueryException('Where clause is required for this statement!', QueryException::QUERY_ERROR_DELETE_NOT_FILTER);
115 115
 
116 116
 		return DbService::getInstance()->query(
117 117
 			$this->getSyntax(),
118
-			$this->queryStructure->getElement( QueryStructure::BIND_PARAMS )
118
+			$this->queryStructure->getElement(QueryStructure::BIND_PARAMS)
119 119
 		);
120 120
 	}
121 121
 }
122 122
\ No newline at end of file
Please login to merge, or discard this patch.
src/Statements/QueryCustom.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -43,22 +43,22 @@  discard block
 block discarded – undo
43 43
 	protected $tablePrefix;
44 44
 
45 45
 
46
-	public function __construct( QueryBuild $queryBuild, $query = '' )
46
+	public function __construct(QueryBuild $queryBuild, $query = '')
47 47
 	{
48 48
 		$this->queryBuild = $queryBuild;
49 49
 		$this->queryStructure = new QueryStructure();
50
-		$this->queryStructure->setElement( QueryStructure::STATEMENT, $this->statement );
51
-		$this->queryStructure->setElement( QueryStructure::QUERY_TYPE, $this->queryBuild->getType() );
52
-		$this->queryStructure->setElement( QueryStructure::QUERY_STRING, $query );
50
+		$this->queryStructure->setElement(QueryStructure::STATEMENT, $this->statement);
51
+		$this->queryStructure->setElement(QueryStructure::QUERY_TYPE, $this->queryBuild->getType());
52
+		$this->queryStructure->setElement(QueryStructure::QUERY_STRING, $query);
53 53
 	}
54 54
 
55 55
 	/**
56 56
 	 * @param array $params
57 57
 	 * @return $this
58 58
 	 */
59
-	public function withBindParams( array $params = [] )
59
+	public function withBindParams(array $params = [])
60 60
 	{
61
-		$this->queryStructure->replaceElement( QueryStructure::BIND_PARAMS, $params );
61
+		$this->queryStructure->replaceElement(QueryStructure::BIND_PARAMS, $params);
62 62
 
63 63
 		return $this;
64 64
 	}
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
 	 * @param bool|int $replacement
68 68
 	 * @return mixed
69 69
 	 */
70
-	public function getSyntax( $replacement = self::REPLACEMENT_NONE )
70
+	public function getSyntax($replacement = self::REPLACEMENT_NONE)
71 71
 	{
72
-		return $this->queryStructure->getElement( QueryStructure::QUERY_STRING );
72
+		return $this->queryStructure->getElement(QueryStructure::QUERY_STRING);
73 73
 	}
74 74
 
75 75
 	/**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	 */
78 78
 	public function getBindParams()
79 79
 	{
80
-		return $this->queryStructure->getElement( QueryStructure::BIND_PARAMS );
80
+		return $this->queryStructure->getElement(QueryStructure::BIND_PARAMS);
81 81
 	}
82 82
 
83 83
 	/**
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
 	public function execute()
87 87
 	{
88 88
 		return DbService::getInstance()->query(
89
-			$this->queryStructure->getElement( QueryStructure::QUERY_STRING ),
90
-			$this->queryStructure->getElement( QueryStructure::BIND_PARAMS )
89
+			$this->queryStructure->getElement(QueryStructure::QUERY_STRING),
90
+			$this->queryStructure->getElement(QueryStructure::BIND_PARAMS)
91 91
 		);
92 92
 	}
93 93
 
Please login to merge, or discard this patch.
src/Statements/QueryStatementInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 	 * @param bool $replacement
19 19
 	 * @return string
20 20
 	 */
21
-	public function getSyntax( $replacement = self::REPLACEMENT_NONE );
21
+	public function getSyntax($replacement = self::REPLACEMENT_NONE);
22 22
 
23 23
 	public function execute();
24 24
 
Please login to merge, or discard this patch.
src/Statements/QueryStatement.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -63,16 +63,16 @@  discard block
 block discarded – undo
63 63
 	 * @param string $table
64 64
 	 * @throws QueryException
65 65
 	 */
66
-	public function __construct( QueryBuild $queryBuild, $table = '' )
66
+	public function __construct(QueryBuild $queryBuild, $table = '')
67 67
 	{
68 68
 
69
-		$table = $this->validateTable( $table );
69
+		$table = $this->validateTable($table);
70 70
 
71 71
 		$this->queryBuild = $queryBuild;
72 72
 		$this->queryStructure = new QueryStructure();
73
-		$this->queryStructure->setElement( QueryStructure::TABLE, $table );
74
-		$this->queryStructure->setElement( QueryStructure::STATEMENT, $this->statement );
75
-		$this->queryStructure->setElement( QueryStructure::QUERY_TYPE, $this->queryBuild->getType() );
73
+		$this->queryStructure->setElement(QueryStructure::TABLE, $table);
74
+		$this->queryStructure->setElement(QueryStructure::STATEMENT, $this->statement);
75
+		$this->queryStructure->setElement(QueryStructure::QUERY_TYPE, $this->queryBuild->getType());
76 76
 
77 77
 	}
78 78
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 	 */
82 82
 	public function getBindParams()
83 83
 	{
84
-		return $this->queryStructure->getElement( QueryStructure::BIND_PARAMS );
84
+		return $this->queryStructure->getElement(QueryStructure::BIND_PARAMS);
85 85
 	}
86 86
 
87 87
 
Please login to merge, or discard this patch.
src/Statements/QueryInsertMultiple.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -36,13 +36,13 @@  discard block
 block discarded – undo
36 36
 	 * @param QueryBuild $queryBuild
37 37
 	 * @param null $table
38 38
 	 */
39
-	public function __construct( QueryBuild $queryBuild, $table = null )
39
+	public function __construct(QueryBuild $queryBuild, $table = null)
40 40
 	{
41
-		parent::__construct( $queryBuild, $table );
42
-		$this->queryStructure->setElement( QueryStructure::FIELDS, array() );
41
+		parent::__construct($queryBuild, $table);
42
+		$this->queryStructure->setElement(QueryStructure::FIELDS, array());
43 43
 	}
44 44
 
45
-	public function getSyntax( $replacement = self::REPLACEMENT_NONE )
45
+	public function getSyntax($replacement = self::REPLACEMENT_NONE)
46 46
 	{
47 47
 		$syntax = array();
48 48
 
@@ -59,26 +59,26 @@  discard block
 block discarded – undo
59 59
 		/**
60 60
 		 * PRIORITY
61 61
 		 */
62
-		$syntax[] = $this->queryStructure->getElement( QueryStructure::PRIORITY );
62
+		$syntax[] = $this->queryStructure->getElement(QueryStructure::PRIORITY);
63 63
 
64 64
 		/**
65 65
 		 * IGNORE clause
66 66
 		 */
67
-		$syntax[] = $this->queryStructure->getElement( QueryStructure::IGNORE ) ? 'IGNORE' : '';
67
+		$syntax[] = $this->queryStructure->getElement(QueryStructure::IGNORE) ? 'IGNORE' : '';
68 68
 
69 69
 		/**
70 70
 		 * INTO table
71 71
 		 */
72
-		$syntax[] = 'INTO ' . $this->queryStructure->getElement( QueryStructure::TABLE );
72
+		$syntax[] = 'INTO ' . $this->queryStructure->getElement(QueryStructure::TABLE);
73 73
 
74 74
 		/**
75 75
 		 * FIELDS update
76 76
 		 */
77 77
 		$syntax[] = $this->getInsertMultipleRowsSyntax();
78 78
 
79
-		$syntax = implode( ' ', $syntax );
79
+		$syntax = implode(' ', $syntax);
80 80
 
81
-		return $this->getSyntaxReplace( $syntax, $replacement );
81
+		return $this->getSyntaxReplace($syntax, $replacement);
82 82
 
83 83
 	}
84 84
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	{
87 87
 		return DbService::getInstance()->query(
88 88
 			$this->getSyntax(),
89
-			$this->queryStructure->getElement( QueryStructure::BIND_PARAMS )
89
+			$this->queryStructure->getElement(QueryStructure::BIND_PARAMS)
90 90
 		);
91 91
 	}
92 92
 }
93 93
\ No newline at end of file
Please login to merge, or discard this patch.