@@ -60,14 +60,14 @@ |
||
60 | 60 | */ |
61 | 61 | private function prepareArrayFields( $fieldsArray = array() ) |
62 | 62 | { |
63 | - $prepareArray = []; |
|
63 | + $prepareArray = [ ]; |
|
64 | 64 | |
65 | 65 | foreach ( $fieldsArray as $field ) { |
66 | 66 | if ( gettype( $field ) !== QueryStructure::ELEMENT_TYPE_STRING ) |
67 | 67 | throw new QueryException( 'Invalid select field type!', QueryException::QUERY_ERROR_SELECT_INVALID_FIELD ); |
68 | 68 | |
69 | 69 | if ( '' !== trim( $field ) ) |
70 | - $prepareArray[] = trim( $field ); |
|
70 | + $prepareArray[ ] = trim( $field ); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | return $prepareArray; |
@@ -24,7 +24,7 @@ discard block |
||
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 | 29 | $column = trim( $column ); |
30 | 30 | |
@@ -43,7 +43,7 @@ discard block |
||
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 | 48 | $column = trim( $column ); |
49 | 49 |
@@ -80,7 +80,7 @@ |
||
80 | 80 | $pdoRowValues = array(); |
81 | 81 | |
82 | 82 | foreach ( $rowValues as $value ) |
83 | - $pdoRowValues[] = $this->queryStructure->bindParam( 'value', $value ); |
|
83 | + $pdoRowValues[ ] = $this->queryStructure->bindParam( 'value', $value ); |
|
84 | 84 | |
85 | 85 | $pdoRowValuesString = '( ' . QueryHelper::implode( $pdoRowValues, ', ' ) . ' )'; |
86 | 86 |
@@ -43,8 +43,8 @@ |
||
43 | 43 | $search = array(); |
44 | 44 | $replace = array(); |
45 | 45 | foreach ( $bindParams as $key => $value ) { |
46 | - $search[] = ':' . $key; |
|
47 | - $replace[] = DbConnect::getInstance()->quote( $value ); |
|
46 | + $search[ ] = ':' . $key; |
|
47 | + $replace[ ] = DbConnect::getInstance()->quote( $value ); |
|
48 | 48 | } |
49 | 49 | $syntax = str_ireplace( $search, $replace, $syntax ); |
50 | 50 |
@@ -60,32 +60,32 @@ |
||
60 | 60 | /** |
61 | 61 | * Explain |
62 | 62 | */ |
63 | - $syntax[] = $this->getExplainSyntax(); |
|
63 | + $syntax[ ] = $this->getExplainSyntax(); |
|
64 | 64 | |
65 | 65 | /** |
66 | 66 | * UPDATE statement |
67 | 67 | */ |
68 | - $syntax[] = $this->statement; |
|
68 | + $syntax[ ] = $this->statement; |
|
69 | 69 | |
70 | 70 | /** |
71 | 71 | * PRIORITY |
72 | 72 | */ |
73 | - $syntax[] = $this->queryStructure->getElement( QueryStructure::PRIORITY ); |
|
73 | + $syntax[ ] = $this->queryStructure->getElement( QueryStructure::PRIORITY ); |
|
74 | 74 | |
75 | 75 | /** |
76 | 76 | * IGNORE clause |
77 | 77 | */ |
78 | - $syntax[] = $this->queryStructure->getElement( QueryStructure::IGNORE ) ? 'IGNORE' : ''; |
|
78 | + $syntax[ ] = $this->queryStructure->getElement( QueryStructure::IGNORE ) ? 'IGNORE' : ''; |
|
79 | 79 | |
80 | 80 | /** |
81 | 81 | * INTO table |
82 | 82 | */ |
83 | - $syntax[] = 'INTO ' . $this->queryStructure->getElement( QueryStructure::TABLE ); |
|
83 | + $syntax[ ] = 'INTO ' . $this->queryStructure->getElement( QueryStructure::TABLE ); |
|
84 | 84 | |
85 | 85 | /** |
86 | 86 | * FIELDS update |
87 | 87 | */ |
88 | - $syntax[] = $this->getSettingFieldsSyntax(); |
|
88 | + $syntax[ ] = $this->getSettingFieldsSyntax(); |
|
89 | 89 | |
90 | 90 | $syntax = implode( ' ', $syntax ); |
91 | 91 |
@@ -115,62 +115,62 @@ |
||
115 | 115 | /** |
116 | 116 | * Explain |
117 | 117 | */ |
118 | - $syntax[] = $this->getExplainSyntax(); |
|
118 | + $syntax[ ] = $this->getExplainSyntax(); |
|
119 | 119 | |
120 | 120 | /** |
121 | 121 | * SELECT statement |
122 | 122 | */ |
123 | - $syntax[] = $this->statement; |
|
123 | + $syntax[ ] = $this->statement; |
|
124 | 124 | |
125 | 125 | /** |
126 | 126 | * PRIORITY |
127 | 127 | */ |
128 | - $syntax[] = $this->queryStructure->getElement( QueryStructure::PRIORITY ); |
|
128 | + $syntax[ ] = $this->queryStructure->getElement( QueryStructure::PRIORITY ); |
|
129 | 129 | |
130 | 130 | /** |
131 | 131 | * DISTINCT clause |
132 | 132 | */ |
133 | - $syntax[] = $this->getDistinctSyntax(); |
|
133 | + $syntax[ ] = $this->getDistinctSyntax(); |
|
134 | 134 | |
135 | 135 | /** |
136 | 136 | * FIELDS |
137 | 137 | */ |
138 | - $syntax[] = $this->queryStructure->getElement( QueryStructure::FIELDS ); |
|
138 | + $syntax[ ] = $this->queryStructure->getElement( QueryStructure::FIELDS ); |
|
139 | 139 | |
140 | 140 | /** |
141 | 141 | * FROM table or queryStructure |
142 | 142 | */ |
143 | - $syntax[] = 'FROM ' . $this->queryStructure->getElement( QueryStructure::TABLE ); |
|
143 | + $syntax[ ] = 'FROM ' . $this->queryStructure->getElement( QueryStructure::TABLE ); |
|
144 | 144 | |
145 | 145 | /** |
146 | 146 | * JOIN CLAUSES |
147 | 147 | */ |
148 | - $syntax[] = $this->getJoinSyntax(); |
|
148 | + $syntax[ ] = $this->getJoinSyntax(); |
|
149 | 149 | |
150 | 150 | /** |
151 | 151 | * WHERE clause |
152 | 152 | */ |
153 | - $syntax[] = $this->getWhereSyntax(); |
|
153 | + $syntax[ ] = $this->getWhereSyntax(); |
|
154 | 154 | |
155 | 155 | /** |
156 | 156 | * GROUP BY clause |
157 | 157 | */ |
158 | - $syntax[] = $this->getGroupBySyntax(); |
|
158 | + $syntax[ ] = $this->getGroupBySyntax(); |
|
159 | 159 | |
160 | 160 | /** |
161 | 161 | * HAVING clause |
162 | 162 | */ |
163 | - $syntax[] = $this->getHavingSyntax(); |
|
163 | + $syntax[ ] = $this->getHavingSyntax(); |
|
164 | 164 | |
165 | 165 | /** |
166 | 166 | * ORDER BY clause |
167 | 167 | */ |
168 | - $syntax[] = $this->getOrderBySyntax(); |
|
168 | + $syntax[ ] = $this->getOrderBySyntax(); |
|
169 | 169 | |
170 | 170 | /** |
171 | 171 | * LIMIT clause |
172 | 172 | */ |
173 | - $syntax[] = $this->getLimitSyntax(); |
|
173 | + $syntax[ ] = $this->getLimitSyntax(); |
|
174 | 174 | |
175 | 175 | $syntax = implode( ' ', $syntax ); |
176 | 176 |
@@ -52,47 +52,47 @@ |
||
52 | 52 | /** |
53 | 53 | * Explain |
54 | 54 | */ |
55 | - $syntax[] = $this->getExplainSyntax(); |
|
55 | + $syntax[ ] = $this->getExplainSyntax(); |
|
56 | 56 | |
57 | 57 | /** |
58 | 58 | * UPDATE statement |
59 | 59 | */ |
60 | - $syntax[] = $this->statement; |
|
60 | + $syntax[ ] = $this->statement; |
|
61 | 61 | |
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 |
79 | 79 | */ |
80 | - $syntax[] = $this->getSettingFieldsSyntax(); |
|
80 | + $syntax[ ] = $this->getSettingFieldsSyntax(); |
|
81 | 81 | |
82 | 82 | /** |
83 | 83 | * WHERE clause |
84 | 84 | */ |
85 | - $syntax[] = $this->getWhereSyntax(); |
|
85 | + $syntax[ ] = $this->getWhereSyntax(); |
|
86 | 86 | |
87 | 87 | /** |
88 | 88 | * ORDER BY clause |
89 | 89 | */ |
90 | - $syntax[] = $this->getOrderBySyntax(); |
|
90 | + $syntax[ ] = $this->getOrderBySyntax(); |
|
91 | 91 | |
92 | 92 | /** |
93 | 93 | * LIMIT clause |
94 | 94 | */ |
95 | - $syntax[] = $this->getLimitSyntax(); |
|
95 | + $syntax[ ] = $this->getLimitSyntax(); |
|
96 | 96 | |
97 | 97 | $syntax = implode( ' ', $syntax ); |
98 | 98 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | /** |
36 | 36 | * @var array |
37 | 37 | */ |
38 | - protected $usedInstanceIds = []; |
|
38 | + protected $usedInstanceIds = [ ]; |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * @var string |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | * @param array $params |
62 | 62 | * @return $this |
63 | 63 | */ |
64 | - public function withBindParams( array $params = [] ) |
|
64 | + public function withBindParams( array $params = [ ] ) |
|
65 | 65 | { |
66 | 66 | $this->queryStructure->replaceElement( QueryStructure::BIND_PARAMS, $params ); |
67 | 67 |
@@ -52,37 +52,37 @@ |
||
52 | 52 | /** |
53 | 53 | * Explain |
54 | 54 | */ |
55 | - $syntax[] = $this->getExplainSyntax(); |
|
55 | + $syntax[ ] = $this->getExplainSyntax(); |
|
56 | 56 | |
57 | 57 | /** |
58 | 58 | * UPDATE statement |
59 | 59 | */ |
60 | - $syntax[] = $this->statement; |
|
60 | + $syntax[ ] = $this->statement; |
|
61 | 61 | |
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 | * TABLE update |
69 | 69 | */ |
70 | - $syntax[] = 'FROM ' . $this->queryStructure->getElement( QueryStructure::TABLE ); |
|
70 | + $syntax[ ] = 'FROM ' . $this->queryStructure->getElement( QueryStructure::TABLE ); |
|
71 | 71 | |
72 | 72 | /** |
73 | 73 | * WHERE clause |
74 | 74 | */ |
75 | - $syntax[] = $this->getWhereSyntax(); |
|
75 | + $syntax[ ] = $this->getWhereSyntax(); |
|
76 | 76 | |
77 | 77 | /** |
78 | 78 | * ORDER BY clause |
79 | 79 | */ |
80 | - $syntax[] = $this->getOrderBySyntax(); |
|
80 | + $syntax[ ] = $this->getOrderBySyntax(); |
|
81 | 81 | |
82 | 82 | /** |
83 | 83 | * LIMIT clause |
84 | 84 | */ |
85 | - $syntax[] = $this->getLimitSyntax(); |
|
85 | + $syntax[ ] = $this->getLimitSyntax(); |
|
86 | 86 | |
87 | 87 | $syntax = implode( ' ', $syntax ); |
88 | 88 |