@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | |
| 108 | 108 | $needle = $prevEntityAlias . "_" . $currentEntityAlias; |
| 109 | 109 | |
| 110 | - return ! in_array($needle, $this->joins); |
|
| 110 | + return !in_array($needle, $this->joins); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | private function storeJoin($prevEntityAlias, $currentEntityAlias) |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | Value $filterValue |
| 222 | 222 | ) { |
| 223 | 223 | $whereCondition = null; |
| 224 | - $filterAndOperator = explode('|',$filter); |
|
| 224 | + $filterAndOperator = explode('|', $filter); |
|
| 225 | 225 | |
| 226 | 226 | if (!isset($filterAndOperator[1])) { |
| 227 | 227 | $filterAndOperator[1] = 'eq'; |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | $fieldName = $this->parser->camelize($fieldName); |
| 233 | 233 | |
| 234 | 234 | $operator = $this->getValueAvailableFilters()[self::DEFAULT_OPERATOR]; |
| 235 | - if(isset($filterAndOperator[1])){ |
|
| 235 | + if (isset($filterAndOperator[1])) { |
|
| 236 | 236 | $operator = $this->getValueAvailableFilters()[$filterAndOperator[1]]; |
| 237 | 237 | } |
| 238 | 238 | |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | . ' (:field_' . $fieldName . $salt . ')'; |
| 257 | 257 | } else if ('field_eq' == $filterAndOperator[1]) { |
| 258 | 258 | $whereCondition = |
| 259 | - $this->entityAlias . '.' . $fieldName . ' '. |
|
| 259 | + $this->entityAlias . '.' . $fieldName . ' ' . |
|
| 260 | 260 | $operator['meta'] . '' . |
| 261 | 261 | $this->entityAlias . '.' . $value; |
| 262 | 262 | //} else { |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | $relationEntityAlias = $this->getRelationEntityAlias(); |
| 308 | 308 | |
| 309 | 309 | $embeddedFields = explode('.', $fieldName); |
| 310 | - $fieldName = $this->parser->camelize($embeddedFields[count($embeddedFields)-1]); |
|
| 310 | + $fieldName = $this->parser->camelize($embeddedFields[count($embeddedFields) - 1]); |
|
| 311 | 311 | |
| 312 | 312 | $salt = ''; |
| 313 | 313 | foreach ($this->qBuilder->getParameters() as $parameter) { |
@@ -354,14 +354,14 @@ discard block |
||
| 354 | 354 | private function applyFilterOr($filter, $value, $orCondition) |
| 355 | 355 | { |
| 356 | 356 | $whereCondition = null; |
| 357 | - $filterAndOperator = explode('|',$filter); |
|
| 357 | + $filterAndOperator = explode('|', $filter); |
|
| 358 | 358 | $op = Operator::fromString($filterAndOperator[1]); |
| 359 | 359 | |
| 360 | 360 | $fieldName = $filterAndOperator[0]; |
| 361 | 361 | $fieldName = $this->parser->camelize($fieldName); |
| 362 | 362 | |
| 363 | 363 | $operator = $this->getValueAvailableFilters()[self::DEFAULT_OPERATOR]; |
| 364 | - if(isset($filterAndOperator[1])){ |
|
| 364 | + if (isset($filterAndOperator[1])) { |
|
| 365 | 365 | $operator = $this->getValueAvailableFilters()[$filterAndOperator[1]]; |
| 366 | 366 | } |
| 367 | 367 | |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | . ' (:field_' . $fieldName . $salt . ')'; |
| 391 | 391 | } else if ('field_eq' == $filterAndOperator[1]) { |
| 392 | 392 | $whereCondition = |
| 393 | - $this->entityAlias . '.' . $fieldName . ' '. |
|
| 393 | + $this->entityAlias . '.' . $fieldName . ' ' . |
|
| 394 | 394 | $operator['meta'] . '' . |
| 395 | 395 | $this->entityAlias . '.' . $value |
| 396 | 396 | ; |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | } else { |
| 407 | 407 | $whereCondition = $this->entityAlias . '.' . $fieldName . ' ' |
| 408 | 408 | . '=' |
| 409 | - . ' :field_'.$fieldName . $salt; |
|
| 409 | + . ' :field_' . $fieldName . $salt; |
|
| 410 | 410 | } |
| 411 | 411 | |
| 412 | 412 | if ($orCondition['orCondition'] != null) { |
@@ -455,7 +455,7 @@ discard block |
||
| 455 | 455 | $relationEntityAlias = $this->getRelationEntityAlias(); |
| 456 | 456 | |
| 457 | 457 | $embeddedFields = explode('.', $fieldName); |
| 458 | - $fieldName = $this->parser->camelize($embeddedFields[count($embeddedFields)-1]); |
|
| 458 | + $fieldName = $this->parser->camelize($embeddedFields[count($embeddedFields) - 1]); |
|
| 459 | 459 | |
| 460 | 460 | $salt = ''; |
| 461 | 461 | foreach ($this->qBuilder->getParameters() as $parameter) { |
@@ -528,7 +528,7 @@ discard block |
||
| 528 | 528 | |
| 529 | 529 | if (in_array($fieldName, $this->fields)) { |
| 530 | 530 | $direction = ($val === self::DIRECTION_AZ) ? self::DIRECTION_AZ : self::DIRECTION_ZA; |
| 531 | - $this->qBuilder->addOrderBy($this->entityAlias .'.'. $fieldName, $direction); |
|
| 531 | + $this->qBuilder->addOrderBy($this->entityAlias . '.' . $fieldName, $direction); |
|
| 532 | 532 | } |
| 533 | 533 | |
| 534 | 534 | if (strstr($sort, '_embedded.')) { |
@@ -539,7 +539,7 @@ discard block |
||
| 539 | 539 | $fieldName = $this->parser->camelize($embeddedFields[2]); |
| 540 | 540 | $direction = ($val === self::DIRECTION_AZ) ? self::DIRECTION_AZ : self::DIRECTION_ZA; |
| 541 | 541 | |
| 542 | - $this->qBuilder->addOrderBy($relationEntityAlias.'.'.$fieldName, $direction); |
|
| 542 | + $this->qBuilder->addOrderBy($relationEntityAlias . '.' . $fieldName, $direction); |
|
| 543 | 543 | } |
| 544 | 544 | |
| 545 | 545 | } |
@@ -627,7 +627,7 @@ discard block |
||
| 627 | 627 | return $this->pageLength; |
| 628 | 628 | } |
| 629 | 629 | |
| 630 | - public function setSelect( $select) : QueryBuilderFactory |
|
| 630 | + public function setSelect($select) : QueryBuilderFactory |
|
| 631 | 631 | { |
| 632 | 632 | $this->select = $select; |
| 633 | 633 | |