@@ -39,8 +39,8 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | $this->fields = array_keys($this->getClassMetadata()->fieldMappings); |
| 41 | 41 | |
| 42 | - $entityName = explode('\\', strtolower($this->getEntityName()) ); |
|
| 43 | - $entityName = $entityName[count($entityName)-1]; |
|
| 42 | + $entityName = explode('\\', strtolower($this->getEntityName())); |
|
| 43 | + $entityName = $entityName[count($entityName) - 1]; |
|
| 44 | 44 | $entityAlias = $entityName[0]; |
| 45 | 45 | $this->entityAlias = $entityAlias; |
| 46 | 46 | |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | foreach ($orFilters as $key => $filter) { |
| 116 | 116 | if (is_array($filter)) { |
| 117 | 117 | foreach ($filter as $keyInternal => $internal) { |
| 118 | - $filterOrCorrected[$keyInternal .'|' . $count] = $internal; |
|
| 118 | + $filterOrCorrected[$keyInternal . '|' . $count] = $internal; |
|
| 119 | 119 | $count = $count + 1; |
| 120 | 120 | } |
| 121 | 121 | } else { |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | foreach ($orFilters as $key => $filter) { |
| 183 | 183 | if (is_array($filter)) { |
| 184 | 184 | foreach ($filter as $keyInternal => $internal) { |
| 185 | - $filterOrCorrected[$keyInternal .'|' . $count] = $internal; |
|
| 185 | + $filterOrCorrected[$keyInternal . '|' . $count] = $internal; |
|
| 186 | 186 | $count = $count + 1; |
| 187 | 187 | } |
| 188 | 188 | } else { |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | foreach ($orFilters as $key => $filter) { |
| 238 | 238 | if (is_array($filter)) { |
| 239 | 239 | foreach ($filter as $keyInternal => $internal) { |
| 240 | - $filterOrCorrected[$keyInternal .'|' . $count] = $internal; |
|
| 240 | + $filterOrCorrected[$keyInternal . '|' . $count] = $internal; |
|
| 241 | 241 | $count = $count + 1; |
| 242 | 242 | } |
| 243 | 243 | } else { |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | $pagerAdapter = new DoctrineORMAdapter($queryBuilder); |
| 307 | 307 | |
| 308 | 308 | $query = $pagerAdapter->getQuery(); |
| 309 | - if(isset($this->use_result_cache) and $this->use_result_cache){ |
|
| 309 | + if (isset($this->use_result_cache) and $this->use_result_cache) { |
|
| 310 | 310 | $query->useResultCache(true, 600); |
| 311 | 311 | } |
| 312 | 312 | |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | $params[$itemValue] = $this->queryOptions->get($itemValue); |
| 345 | 345 | } |
| 346 | 346 | |
| 347 | - if(!isset($this->route_name)){ |
|
| 347 | + if (!isset($this->route_name)) { |
|
| 348 | 348 | $this->route_name = $this->queryOptions->get('_route'); |
| 349 | 349 | } |
| 350 | 350 | |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | public function noExistsJoin($prevEntityAlias, $currentEntityAlias) |
| 356 | 356 | { |
| 357 | 357 | $needle = $prevEntityAlias . "_" . $currentEntityAlias; |
| 358 | - return ! in_array($needle, $this->joins); |
|
| 358 | + return !in_array($needle, $this->joins); |
|
| 359 | 359 | } |
| 360 | 360 | |
| 361 | 361 | /** @deprecate use QueryBuilderFactory instead */ |
@@ -431,8 +431,8 @@ discard block |
||
| 431 | 431 | |
| 432 | 432 | public function getEntityAlias(string $entityName) : string |
| 433 | 433 | { |
| 434 | - $arrayEntityName = explode('\\', strtolower($entityName) ); |
|
| 435 | - $entityAlias = $arrayEntityName[count($arrayEntityName)-1]; |
|
| 434 | + $arrayEntityName = explode('\\', strtolower($entityName)); |
|
| 435 | + $entityAlias = $arrayEntityName[count($arrayEntityName) - 1]; |
|
| 436 | 436 | return $entityAlias; |
| 437 | 437 | } |
| 438 | 438 | |
@@ -461,18 +461,18 @@ discard block |
||
| 461 | 461 | |
| 462 | 462 | $table = $this->getEntityManager()->getClassMetadata($this->getEntityName())->getTableName(); |
| 463 | 463 | |
| 464 | - $sql = 'INSERT INTO '.$table; |
|
| 465 | - $sql .= '('. $list_keys . ') '; |
|
| 466 | - $sql .= "VALUES(". $list_values.") "; |
|
| 464 | + $sql = 'INSERT INTO ' . $table; |
|
| 465 | + $sql .= '(' . $list_keys . ') '; |
|
| 466 | + $sql .= "VALUES(" . $list_values . ") "; |
|
| 467 | 467 | $sql .= 'ON DUPLICATE KEY UPDATE '; |
| 468 | 468 | |
| 469 | 469 | $c = 0; |
| 470 | - foreach($updateFields as $column => $value) { |
|
| 470 | + foreach ($updateFields as $column => $value) { |
|
| 471 | 471 | if ($c > 0) { |
| 472 | 472 | $sql .= ", "; |
| 473 | 473 | } |
| 474 | 474 | |
| 475 | - $sql .= '`'.$column . "` = '". $value."'"; |
|
| 475 | + $sql .= '`' . $column . "` = '" . $value . "'"; |
|
| 476 | 476 | $c++; |
| 477 | 477 | } |
| 478 | 478 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | $configuration = new Configuration(); |
| 23 | 23 | $this->processConfiguration($configuration, $configs); |
| 24 | 24 | |
| 25 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 25 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 26 | 26 | $loader->load('services.yml'); |
| 27 | 27 | } |
| 28 | 28 | } |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | public static function fromFilteringObject( |
| 44 | 44 | FilteringObject $filteringObject |
| 45 | 45 | ) : Operator { |
| 46 | - if (true === $filteringObject->hasOperator()){ |
|
| 46 | + if (true === $filteringObject->hasOperator()) { |
|
| 47 | 47 | $operatorName = $filteringObject->getOperator(); |
| 48 | 48 | $operator = Operators::get($operatorName); |
| 49 | 49 | |
@@ -91,7 +91,7 @@ |
||
| 91 | 91 | : $this->getFieldName(); |
| 92 | 92 | |
| 93 | 93 | return $this->relationEntityAlias . '.' . $this->fieldName . |
| 94 | - ' ' . $this->operator->getMeta() . |
|
| 94 | + ' ' . $this->operator->getMeta() . |
|
| 95 | 95 | ' ' . $fieldName; |
| 96 | 96 | } |
| 97 | 97 | |