@@ -103,10 +103,11 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | private function makeInCondition() |
| 105 | 105 | { |
| 106 | - if ( is_a( $this->temporaryParam[ 1 ], QuerySelect::class ) ) |
|
| 107 | - $this->inQuerySelect(); |
|
| 108 | - elseif ( is_array( $this->temporaryParam[ 1 ] ) ) |
|
| 109 | - $this->inArray(); |
|
| 106 | + if ( is_a( $this->temporaryParam[ 1 ], QuerySelect::class ) ) { |
|
| 107 | + $this->inQuerySelect(); |
|
| 108 | + } elseif ( is_array( $this->temporaryParam[ 1 ] ) ) { |
|
| 109 | + $this->inArray(); |
|
| 110 | + } |
|
| 110 | 111 | } |
| 111 | 112 | |
| 112 | 113 | private function inQuerySelect() |
@@ -182,8 +183,9 @@ discard block |
||
| 182 | 183 | */ |
| 183 | 184 | private function getWhereAndHavingSyntax( $clauseType ) |
| 184 | 185 | { |
| 185 | - if ( count( $this->queryStructure->getElement( $clauseType ) ) == 0 ) |
|
| 186 | - return ''; |
|
| 186 | + if ( count( $this->queryStructure->getElement( $clauseType ) ) == 0 ) { |
|
| 187 | + return ''; |
|
| 188 | + } |
|
| 187 | 189 | |
| 188 | 190 | $where = ''; |
| 189 | 191 | $last_type = 'where_start'; |
@@ -212,11 +214,13 @@ discard block |
||
| 212 | 214 | */ |
| 213 | 215 | private function validateWhereParam( $param ) |
| 214 | 216 | { |
| 215 | - if ( count( $param ) < 2 ) |
|
| 216 | - throw new QueryException( 'Invalid where array!', QueryException::QUERY_ERROR_WHERE_INVALID_PARAM_ARRAY ); |
|
| 217 | + if ( count( $param ) < 2 ) { |
|
| 218 | + throw new QueryException( 'Invalid where array!', QueryException::QUERY_ERROR_WHERE_INVALID_PARAM_ARRAY ); |
|
| 219 | + } |
|
| 217 | 220 | |
| 218 | - if ( count( $param ) == 2 ) |
|
| 219 | - $param[] = '='; |
|
| 221 | + if ( count( $param ) == 2 ) { |
|
| 222 | + $param[] = '='; |
|
| 223 | + } |
|
| 220 | 224 | |
| 221 | 225 | $param[ 2 ] = trim( strtoupper( $param[ 2 ] ) ); |
| 222 | 226 | $param[ 2 ] = QueryHelper::clearMultipleSpaces( $param[ 2 ] ); |