@@ -87,7 +87,9 @@ discard block |
||
| 87 | 87 | if (!empty($sort)) { |
| 88 | 88 | $query->sortClauses = $this->getSortClauses($sort); |
| 89 | 89 | } |
| 90 | - if (isset($query->performCount)) $query->performCount = false; |
|
| 90 | + if (isset($query->performCount)) { |
|
| 91 | + $query->performCount = false; |
|
| 92 | + } |
|
| 91 | 93 | $query->filter = $this->getQueryCriterion($key, $values); |
| 92 | 94 | $results = $this->getSearchService()->findLocations($query); |
| 93 | 95 | |
@@ -234,7 +236,9 @@ discard block |
||
| 234 | 236 | { |
| 235 | 237 | $query = new LocationQuery(); |
| 236 | 238 | $query->limit = self::INT_MAX_16BIT; |
| 237 | - if (isset($query->performCount)) $query->performCount = false; |
|
| 239 | + if (isset($query->performCount)) { |
|
| 240 | + $query->performCount = false; |
|
| 241 | + } |
|
| 238 | 242 | $query->filter = new Query\Criterion\ParentLocationId($parentLocationIds); |
| 239 | 243 | |
| 240 | 244 | $results = $this->getSearchService()->findLocations($query); |
@@ -80,15 +80,15 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | foreach ($conditions as $key => $values) { |
| 82 | 82 | |
| 83 | - switch($key) { |
|
| 83 | + switch ($key) { |
|
| 84 | 84 | |
| 85 | 85 | case self::MATCH_RELATES_TO: |
| 86 | 86 | $contentService = $this->repository->getContentService(); |
| 87 | 87 | $contents = array(); |
| 88 | 88 | // allow to specify the objects to relate to using different ways |
| 89 | 89 | $relatedContents = $this->match($values); |
| 90 | - foreach($relatedContents as $relatedContent) { |
|
| 91 | - foreach($contentService->loadReverseRelations($relatedContent->contentInfo) as $relatingContent) { |
|
| 90 | + foreach ($relatedContents as $relatedContent) { |
|
| 91 | + foreach ($contentService->loadReverseRelations($relatedContent->contentInfo) as $relatingContent) { |
|
| 92 | 92 | $contents[$relatingContent->contentInfo->id] = $relatingContent; |
| 93 | 93 | } |
| 94 | 94 | } |
@@ -99,8 +99,8 @@ discard block |
||
| 99 | 99 | $contents = array(); |
| 100 | 100 | // allow to specify the objects we relate to using different ways |
| 101 | 101 | $relatingContents = $this->match($values); |
| 102 | - foreach($relatingContents as $relatingContent) { |
|
| 103 | - foreach($contentService->loadRelations($relatingContent->contentInfo) as $relatedContent) { |
|
| 102 | + foreach ($relatingContents as $relatingContent) { |
|
| 103 | + foreach ($contentService->loadRelations($relatingContent->contentInfo) as $relatedContent) { |
|
| 104 | 104 | $contents[$relatedContent->contentInfo->id] = $relatedContent; |
| 105 | 105 | } |
| 106 | 106 | } |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | $query->performCount = false; |
| 350 | 350 | $query->filter = new Query\Criterion\ContentTypeIdentifier('this_is_a_very_unlikely_content_type_identifier'); |
| 351 | 351 | //$query->filter = new Query\Criterion\ContentTypeId($contentTypeIds); |
| 352 | - } catch(NotImplementedException $e) { |
|
| 352 | + } catch (NotImplementedException $e) { |
|
| 353 | 353 | return false; |
| 354 | 354 | } |
| 355 | 355 | } |
@@ -120,7 +120,9 @@ discard block |
||
| 120 | 120 | $query = new Query(); |
| 121 | 121 | $query->limit = $limit != 0 ? $limit : $this->queryLimit; |
| 122 | 122 | $query->offset = $offset; |
| 123 | - if (isset($query->performCount)) $query->performCount = false; |
|
| 123 | + if (isset($query->performCount)) { |
|
| 124 | + $query->performCount = false; |
|
| 125 | + } |
|
| 124 | 126 | $query->filter = $this->getQueryCriterion($key, $values); |
| 125 | 127 | if (!empty($sort)) { |
| 126 | 128 | $query->sortClauses = $this->getSortClauses($sort); |
@@ -246,7 +248,9 @@ discard block |
||
| 246 | 248 | { |
| 247 | 249 | $query = new Query(); |
| 248 | 250 | $query->limit = $this->queryLimit; |
| 249 | - if (isset($query->performCount)) $query->performCount = false; |
|
| 251 | + if (isset($query->performCount)) { |
|
| 252 | + $query->performCount = false; |
|
| 253 | + } |
|
| 250 | 254 | $query->filter = new Query\Criterion\ParentLocationId($parentLocationIds); |
| 251 | 255 | $results = $this->getSearchService()->findContent($query); |
| 252 | 256 | |
@@ -286,7 +290,9 @@ discard block |
||
| 286 | 290 | { |
| 287 | 291 | $query = new Query(); |
| 288 | 292 | $query->limit = $this->queryLimit; |
| 289 | - if (isset($query->performCount)) $query->performCount = false; |
|
| 293 | + if (isset($query->performCount)) { |
|
| 294 | + $query->performCount = false; |
|
| 295 | + } |
|
| 290 | 296 | $query->filter = new Query\Criterion\ContentTypeIdentifier($contentTypeIdentifiers); |
| 291 | 297 | // sort objects by depth, lower to higher, so that deleting them has less chances of failure |
| 292 | 298 | // NB: we only do this in eZP versions that allow depth sorting on content queries |
@@ -314,7 +320,9 @@ discard block |
||
| 314 | 320 | { |
| 315 | 321 | $query = new Query(); |
| 316 | 322 | $query->limit = $this->queryLimit; |
| 317 | - if (isset($query->performCount)) $query->performCount = false; |
|
| 323 | + if (isset($query->performCount)) { |
|
| 324 | + $query->performCount = false; |
|
| 325 | + } |
|
| 318 | 326 | $query->filter = new Query\Criterion\ContentTypeId($contentTypeIds); |
| 319 | 327 | // sort objects by depth, lower to higher, so that deleting them has less chances of failure |
| 320 | 328 | // NB: we only do this in eZP versions that allow depth sorting on content queries |