@@ -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 | |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | /** |
| 50 | 50 | * @var array |
| 51 | 51 | */ |
| 52 | - protected $usedInstanceIds = []; |
|
| 52 | + protected $usedInstanceIds = [ ]; |
|
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | 55 | * @var string |
@@ -49,32 +49,32 @@ |
||
| 49 | 49 | /** |
| 50 | 50 | * Explain |
| 51 | 51 | */ |
| 52 | - $syntax[] = $this->getExplainSyntax(); |
|
| 52 | + $syntax[ ] = $this->getExplainSyntax(); |
|
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | 55 | * UPDATE statement |
| 56 | 56 | */ |
| 57 | - $syntax[] = $this->statement; |
|
| 57 | + $syntax[ ] = $this->statement; |
|
| 58 | 58 | |
| 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 | - $syntax[] = $this->getInsertMultipleRowsSyntax(); |
|
| 77 | + $syntax[ ] = $this->getInsertMultipleRowsSyntax(); |
|
| 78 | 78 | |
| 79 | 79 | $syntax = implode( ' ', $syntax ); |
| 80 | 80 | |
@@ -278,7 +278,7 @@ discard block |
||
| 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 |
||
| 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 | |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | |
| 140 | 140 | $pdoArray = array(); |
| 141 | 141 | foreach ( $value as $item ) { |
| 142 | - $pdoArray[] = $this->queryStructure->bindParam( 'a', $item ); |
|
| 142 | + $pdoArray[ ] = $this->queryStructure->bindParam( 'a', $item ); |
|
| 143 | 143 | } |
| 144 | 144 | $body = [ |
| 145 | 145 | $field, |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | throw new QueryException( 'Invalid where array!', QueryException::QUERY_ERROR_WHERE_INVALID_PARAM_ARRAY ); |
| 217 | 217 | |
| 218 | 218 | if ( count( $param ) == 2 ) |
| 219 | - $param[] = '='; |
|
| 219 | + $param[ ] = '='; |
|
| 220 | 220 | |
| 221 | 221 | $param[ 0 ] = $this->queryStructure->prepare( $param[ 0 ] ); |
| 222 | 222 | $param[ 2 ] = trim( strtoupper( $param[ 2 ] ) ); |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | if ( !QueryHelper::isInteger( $limit ) ) |
| 32 | 32 | throw new QueryException( 'Invalid Limit value', QueryException::QUERY_ERROR_INVALID_LIMIT ); |
| 33 | 33 | |
| 34 | - $limit = $this->queryStructure->bindParam('lim', (int)$limit); |
|
| 34 | + $limit = $this->queryStructure->bindParam( 'lim', ( int ) $limit ); |
|
| 35 | 35 | |
| 36 | 36 | if ( is_null( $offset ) ) { |
| 37 | 37 | $this->queryStructure->setElement( QueryStructure::LIMIT, $limit ); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | if ( !QueryHelper::isInteger( $offset ) ) |
| 45 | 45 | throw new QueryException( 'Invalid Limit offset', QueryException::QUERY_ERROR_INVALID_LIMIT_OFFSET ); |
| 46 | 46 | |
| 47 | - $offset = $this->queryStructure->bindParam('ofs', (int)$offset); |
|
| 47 | + $offset = $this->queryStructure->bindParam( 'ofs', ( int ) $offset ); |
|
| 48 | 48 | |
| 49 | 49 | $this->queryStructure->setElement( QueryStructure::LIMIT, $offset . ', ' . $limit ); |
| 50 | 50 | |
@@ -58,7 +58,7 @@ discard block |
||
| 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 |
||
| 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 ); |
@@ -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 |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | * @return $this |
| 64 | 64 | * @throws \Qpdb\QueryBuilder\Dependencies\QueryException |
| 65 | 65 | */ |
| 66 | - public function withBindParams( array $params = [] ) |
|
| 66 | + public function withBindParams( array $params = [ ] ) |
|
| 67 | 67 | { |
| 68 | 68 | $this->queryStructure->replaceElement( QueryStructure::BIND_PARAMS, $params ); |
| 69 | 69 | |