@@ -60,8 +60,7 @@ |
||
60 | 60 | } |
61 | 61 | } |
62 | 62 | } |
63 | - } |
|
64 | - else { |
|
63 | + } else { |
|
65 | 64 | throw new \Exception("Path '$path' is neither a file nor directory"); |
66 | 65 | } |
67 | 66 | } |
@@ -78,8 +78,7 @@ |
||
78 | 78 | $this->errOutput->setVerbosity(OutputInterface::VERBOSITY_NORMAL); |
79 | 79 | $this->errOutput->writeln($message, $type); |
80 | 80 | $this->errOutput->setVerbosity(OutputInterface::VERBOSITY_QUIET); |
81 | - } |
|
82 | - else |
|
81 | + } else |
|
83 | 82 | { |
84 | 83 | $this->errOutput->writeln($message, $type); |
85 | 84 | } |
@@ -162,7 +162,9 @@ discard block |
||
162 | 162 | // sort tags by depth so that there will be no errors in case we are deleting parent and child |
163 | 163 | $tagsCollection = $tagsCollection->getArrayCopy(); |
164 | 164 | uasort($tagsCollection, function ($t1, $t2) { |
165 | - if ($t1->depth == $t2->depth) return 0; |
|
165 | + if ($t1->depth == $t2->depth) { |
|
166 | + return 0; |
|
167 | + } |
|
166 | 168 | return ($t1->depth > $t2->depth) ? -1 : 1; |
167 | 169 | }); |
168 | 170 | |
@@ -267,7 +269,9 @@ discard block |
||
267 | 269 | // sort top to bottom |
268 | 270 | $tagCollection = $tagCollection->getArrayCopy(); |
269 | 271 | uasort($tagCollection, function ($t1, $t2) { |
270 | - if ($t1->depth == $t2->depth) return 0; |
|
272 | + if ($t1->depth == $t2->depth) { |
|
273 | + return 0; |
|
274 | + } |
|
271 | 275 | return ($t1->depth > $t2->depth) ? 1 : -1; |
272 | 276 | }); |
273 | 277 | break; |
@@ -275,7 +279,9 @@ discard block |
||
275 | 279 | // sort bottom to top |
276 | 280 | $tagCollection = $tagCollection->getArrayCopy(); |
277 | 281 | uasort($tagCollection, function ($t1, $t2) { |
278 | - if ($t1->depth == $t2->depth) return 0; |
|
282 | + if ($t1->depth == $t2->depth) { |
|
283 | + return 0; |
|
284 | + } |
|
279 | 285 | return ($t1->depth > $t2->depth) ? -1 : 1; |
280 | 286 | }); |
281 | 287 | break; |
@@ -56,7 +56,9 @@ |
||
56 | 56 | |
57 | 57 | $query = new Query(); |
58 | 58 | $query->limit = $this->queryLimit; |
59 | - if (isset($query->performCount)) $query->performCount = false; |
|
59 | + if (isset($query->performCount)) { |
|
60 | + $query->performCount = false; |
|
61 | + } |
|
60 | 62 | $query->filter = $this->getQueryCriterion($key, $values); |
61 | 63 | $results = $this->repository->getTrashService()->findTrashItems($query); |
62 | 64 |
@@ -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); |
@@ -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 |
@@ -599,8 +599,9 @@ |
||
599 | 599 | */ |
600 | 600 | public function getCurrentContext($migrationName) |
601 | 601 | { |
602 | - if (!isset($this->migrationContext[$migrationName])) |
|
603 | - return null; |
|
602 | + if (!isset($this->migrationContext[$migrationName])) { |
|
603 | + return null; |
|
604 | + } |
|
604 | 605 | $context = $this->migrationContext[$migrationName]; |
605 | 606 | // avoid attempting to store the current outputInterface when saving the context |
606 | 607 | if (isset($context['output'])) { |