@@ -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 |