@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | |
41 | 41 | $this->fields = array_keys($this->getClassMetadata()->fieldMappings); |
42 | 42 | |
43 | - $entityName = explode('\\', strtolower($this->getEntityName()) ); |
|
44 | - $entityName = $entityName[count($entityName)-1]; |
|
43 | + $entityName = explode('\\', strtolower($this->getEntityName())); |
|
44 | + $entityName = $entityName[count($entityName) - 1]; |
|
45 | 45 | $entityAlias = $entityName[0]; |
46 | 46 | $this->entityAlias = $entityAlias; |
47 | 47 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | foreach ($requestOptions['orFiltering'] as $key => $filter) { |
110 | 110 | if (is_array($filter)) { |
111 | 111 | foreach ($filter as $keyInternal => $internal) { |
112 | - $filterOrCorrected[$keyInternal .'|' . $count] = $internal; |
|
112 | + $filterOrCorrected[$keyInternal . '|' . $count] = $internal; |
|
113 | 113 | $count = $count + 1; |
114 | 114 | } |
115 | 115 | } else { |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | foreach ($requestOptions['orFiltering'] as $key => $filter) { |
159 | 159 | if (is_array($filter)) { |
160 | 160 | foreach ($filter as $keyInternal => $internal) { |
161 | - $filterOrCorrected[$keyInternal .'|' . $count] = $internal; |
|
161 | + $filterOrCorrected[$keyInternal . '|' . $count] = $internal; |
|
162 | 162 | $count = $count + 1; |
163 | 163 | } |
164 | 164 | } else { |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | foreach ($orFiltering as $key => $filter) { |
194 | 194 | if (is_array($filter)) { |
195 | 195 | foreach ($filter as $keyInternal => $internal) { |
196 | - $filterOrCorrected[$keyInternal .'|' . $count] = $internal; |
|
196 | + $filterOrCorrected[$keyInternal . '|' . $count] = $internal; |
|
197 | 197 | $count = $count + 1; |
198 | 198 | } |
199 | 199 | } else { |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | $pagerAdapter = new DoctrineORMAdapter($queryBuilder); |
249 | 249 | |
250 | 250 | $query = $pagerAdapter->getQuery(); |
251 | - if(isset($this->use_result_cache) and $this->use_result_cache){ |
|
251 | + if (isset($this->use_result_cache) and $this->use_result_cache) { |
|
252 | 252 | $query->useResultCache(true, 600); |
253 | 253 | } |
254 | 254 | |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | $params[$itemValue] = $this->queryOptions->get($itemValue); |
287 | 287 | } |
288 | 288 | |
289 | - if(!isset($this->route_name)){ |
|
289 | + if (!isset($this->route_name)) { |
|
290 | 290 | $this->route_name = $this->queryOptions->get('_route'); |
291 | 291 | } |
292 | 292 | |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | public function noExistsJoin($prevEntityAlias, $currentEntityAlias) |
298 | 298 | { |
299 | 299 | $needle = $prevEntityAlias . "_" . $currentEntityAlias; |
300 | - return ! in_array($needle, $this->joins); |
|
300 | + return !in_array($needle, $this->joins); |
|
301 | 301 | } |
302 | 302 | |
303 | 303 | /** @deprecate use QueryBuilderFactory instead */ |
@@ -373,8 +373,8 @@ discard block |
||
373 | 373 | |
374 | 374 | public function getEntityAlias(string $entityName) : string |
375 | 375 | { |
376 | - $arrayEntityName = explode('\\', strtolower($entityName) ); |
|
377 | - $entityAlias = $arrayEntityName[count($arrayEntityName)-1]; |
|
376 | + $arrayEntityName = explode('\\', strtolower($entityName)); |
|
377 | + $entityAlias = $arrayEntityName[count($arrayEntityName) - 1]; |
|
378 | 378 | return $entityAlias; |
379 | 379 | } |
380 | 380 | |
@@ -403,18 +403,18 @@ discard block |
||
403 | 403 | |
404 | 404 | $table = $this->getEntityManager()->getClassMetadata($this->getEntityName())->getTableName(); |
405 | 405 | |
406 | - $sql = 'INSERT INTO '.$table; |
|
407 | - $sql .= '('. $list_keys . ') '; |
|
408 | - $sql .= "VALUES(". $list_values.") "; |
|
406 | + $sql = 'INSERT INTO ' . $table; |
|
407 | + $sql .= '(' . $list_keys . ') '; |
|
408 | + $sql .= "VALUES(" . $list_values . ") "; |
|
409 | 409 | $sql .= 'ON DUPLICATE KEY UPDATE '; |
410 | 410 | |
411 | 411 | $c = 0; |
412 | - foreach($updateFields as $column => $value) { |
|
412 | + foreach ($updateFields as $column => $value) { |
|
413 | 413 | if ($c > 0) { |
414 | 414 | $sql .= ", "; |
415 | 415 | } |
416 | 416 | |
417 | - $sql .= '`'.$column . "` = '". $value."'"; |
|
417 | + $sql .= '`' . $column . "` = '" . $value . "'"; |
|
418 | 418 | $c++; |
419 | 419 | } |
420 | 420 |
@@ -17,9 +17,9 @@ |
||
17 | 17 | { |
18 | 18 | $requestOption = []; |
19 | 19 | |
20 | - $requestOption['_route'] = $request->attributes->get('_route'); |
|
21 | - $requestOption['customer_id'] = $request->attributes->get('customer_id'); |
|
22 | - $requestOption['id'] = $request->attributes->get('id'); |
|
20 | + $requestOption['_route'] = $request->attributes->get('_route'); |
|
21 | + $requestOption['customer_id'] = $request->attributes->get('customer_id'); |
|
22 | + $requestOption['id'] = $request->attributes->get('id'); |
|
23 | 23 | $requestOption['filters'] = $request->query->get('filtering', []); |
24 | 24 | $requestOption['orFiltering'] = $request->query->get('filtering_or', []); |
25 | 25 | $requestOption['sorting '] = $request->query->get('sorting', []); |