| @@ -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 | |
| @@ -105,7 +105,7 @@ | ||
| 105 | 105 |              ->method('get') | 
| 106 | 106 |              ->with('customer_id') | 
| 107 | 107 | ->will($this->returnValue([ | 
| 108 | - $customerId, | |
| 108 | + $customerId, | |
| 109 | 109 | ])); | 
| 110 | 110 | |
| 111 | 111 | $this->attributeParameterBag | 
| @@ -77,15 +77,15 @@ | ||
| 77 | 77 | $route = 'route ' . rand(0, 1000); | 
| 78 | 78 | $customerId = 'customer_id ' . rand(0, 1000); | 
| 79 | 79 | $id = 'id ' . rand(0, 1000); | 
| 80 | - $filters = 'filters ' . rand(0 ,1000); | |
| 81 | - $orFilterings = 'orFiltering ' . rand(0 ,1000); | |
| 82 | - $sorting = 'sorting ' . rand(0 ,1000); | |
| 83 | - $printing = 'printing ' . rand(0 ,1000); | |
| 84 | - $rel = 'rel ' . rand(0 ,1000); | |
| 85 | - $page = 'page ' . rand(0 ,1000); | |
| 86 | - $select = 'select ' . rand(0 ,1000); | |
| 87 | - $filtering = 'filtering ' . rand(0 ,1000); | |
| 88 | - $limit = 'limit ' . rand(0 ,1000); | |
| 80 | + $filters = 'filters ' . rand(0, 1000); | |
| 81 | + $orFilterings = 'orFiltering ' . rand(0, 1000); | |
| 82 | + $sorting = 'sorting ' . rand(0, 1000); | |
| 83 | + $printing = 'printing ' . rand(0, 1000); | |
| 84 | + $rel = 'rel ' . rand(0, 1000); | |
| 85 | + $page = 'page ' . rand(0, 1000); | |
| 86 | + $select = 'select ' . rand(0, 1000); | |
| 87 | + $filtering = 'filtering ' . rand(0, 1000); | |
| 88 | + $limit = 'limit ' . rand(0, 1000); | |
| 89 | 89 | |
| 90 | 90 | $this->attributeParameterBag = $this | 
| 91 | 91 |              ->getMockBuilder('Symfony\Component\HttpFoundation\ParameterBag') | 
| @@ -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', []); |