@@ -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 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | foreach ($requestOption['orFilters'] as $key => $filter) { |
108 | 108 | if (is_array($filter)) { |
109 | 109 | foreach ($filter as $keyInternal => $internal) { |
110 | - $filterOrCorrected[$keyInternal .'|' . $count] = $internal; |
|
110 | + $filterOrCorrected[$keyInternal . '|' . $count] = $internal; |
|
111 | 111 | $count = $count + 1; |
112 | 112 | } |
113 | 113 | } else { |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | { |
157 | 157 | $requestOption = []; |
158 | 158 | |
159 | - $requestOption['filters'] = $request->query->get('filtering', []); |
|
159 | + $requestOption['filters'] = $request->query->get('filtering', []); |
|
160 | 160 | $requestOption['orFilters'] = $request->query->get('filtering_or', []); |
161 | 161 | $requestOption['sorting '] = $request->query->get('sorting', []); |
162 | 162 | $requestOption['printing'] = $request->query->get('printing', []); |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | foreach ($requestOption['orFilters'] as $key => $filter) { |
184 | 184 | if (is_array($filter)) { |
185 | 185 | foreach ($filter as $keyInternal => $internal) { |
186 | - $filterOrCorrected[$keyInternal .'|' . $count] = $internal; |
|
186 | + $filterOrCorrected[$keyInternal . '|' . $count] = $internal; |
|
187 | 187 | $count = $count + 1; |
188 | 188 | } |
189 | 189 | } else { |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | foreach ($orFilters as $key => $filter) { |
231 | 231 | if (is_array($filter)) { |
232 | 232 | foreach ($filter as $keyInternal => $internal) { |
233 | - $filterOrCorrected[$keyInternal .'|' . $count] = $internal; |
|
233 | + $filterOrCorrected[$keyInternal . '|' . $count] = $internal; |
|
234 | 234 | $count = $count + 1; |
235 | 235 | } |
236 | 236 | } else { |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | $pagerAdapter = new DoctrineORMAdapter($queryBuilder); |
300 | 300 | |
301 | 301 | $query = $pagerAdapter->getQuery(); |
302 | - if(isset($this->use_result_cache) and $this->use_result_cache){ |
|
302 | + if (isset($this->use_result_cache) and $this->use_result_cache) { |
|
303 | 303 | $query->useResultCache(true, 600); |
304 | 304 | } |
305 | 305 | |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | $params[$itemValue] = $this->queryOptions->get($itemValue); |
338 | 338 | } |
339 | 339 | |
340 | - if(!isset($this->route_name)){ |
|
340 | + if (!isset($this->route_name)) { |
|
341 | 341 | $this->route_name = $this->queryOptions->get('_route'); |
342 | 342 | } |
343 | 343 | |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | public function noExistsJoin($prevEntityAlias, $currentEntityAlias) |
349 | 349 | { |
350 | 350 | $needle = $prevEntityAlias . "_" . $currentEntityAlias; |
351 | - return ! in_array($needle, $this->joins); |
|
351 | + return !in_array($needle, $this->joins); |
|
352 | 352 | } |
353 | 353 | |
354 | 354 | /** @deprecate use QueryBuilderFactory instead */ |
@@ -424,8 +424,8 @@ discard block |
||
424 | 424 | |
425 | 425 | public function getEntityAlias(string $entityName) : string |
426 | 426 | { |
427 | - $arrayEntityName = explode('\\', strtolower($entityName) ); |
|
428 | - $entityAlias = $arrayEntityName[count($arrayEntityName)-1]; |
|
427 | + $arrayEntityName = explode('\\', strtolower($entityName)); |
|
428 | + $entityAlias = $arrayEntityName[count($arrayEntityName) - 1]; |
|
429 | 429 | return $entityAlias; |
430 | 430 | } |
431 | 431 | |
@@ -454,18 +454,18 @@ discard block |
||
454 | 454 | |
455 | 455 | $table = $this->getEntityManager()->getClassMetadata($this->getEntityName())->getTableName(); |
456 | 456 | |
457 | - $sql = 'INSERT INTO '.$table; |
|
458 | - $sql .= '('. $list_keys . ') '; |
|
459 | - $sql .= "VALUES(". $list_values.") "; |
|
457 | + $sql = 'INSERT INTO ' . $table; |
|
458 | + $sql .= '(' . $list_keys . ') '; |
|
459 | + $sql .= "VALUES(" . $list_values . ") "; |
|
460 | 460 | $sql .= 'ON DUPLICATE KEY UPDATE '; |
461 | 461 | |
462 | 462 | $c = 0; |
463 | - foreach($updateFields as $column => $value) { |
|
463 | + foreach ($updateFields as $column => $value) { |
|
464 | 464 | if ($c > 0) { |
465 | 465 | $sql .= ", "; |
466 | 466 | } |
467 | 467 | |
468 | - $sql .= '`'.$column . "` = '". $value."'"; |
|
468 | + $sql .= '`' . $column . "` = '" . $value . "'"; |
|
469 | 469 | $c++; |
470 | 470 | } |
471 | 471 |