| @@ -4,7 +4,6 @@ | ||
| 4 | 4 | |
| 5 | 5 | use eZ\Publish\API\Repository\Values\ContentType\ContentType; | 
| 6 | 6 | use eZ\Publish\API\Repository\Values\ContentType\FieldDefinition; | 
| 7 | -use eZ\Publish\API\Repository\Values\Content\Location; | |
| 8 | 7 | use eZ\Publish\API\Repository\Values\Content\Content; | 
| 9 | 8 | use eZ\Publish\API\Repository\Values\Content\ContentCreateStruct; | 
| 10 | 9 | use eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct; | 
| @@ -36,7 +36,9 @@ | ||
| 36 | 36 | |
| 37 | 37 | $query = new Query(); | 
| 38 | 38 | $query->limit = self::INT_MAX_16BIT; | 
| 39 | - if (isset($query->performCount)) $query->performCount = false; | |
| 39 | +            if (isset($query->performCount)) { | |
| 40 | + $query->performCount = false; | |
| 41 | + } | |
| 40 | 42 | $query->filter = $this->getQueryCriterion($key, $values); | 
| 41 | 43 | $results = $this->repository->getTrashService()->findTrashItems($query); | 
| 42 | 44 | |
| @@ -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 | } | 
| @@ -10,7 +10,6 @@ | ||
| 10 | 10 | use Kaliop\eZMigrationBundle\API\Collection\MigrationCollection; | 
| 11 | 11 | use Kaliop\eZMigrationBundle\API\Value\Migration as APIMigration; | 
| 12 | 12 | use Kaliop\eZMigrationBundle\API\Value\MigrationDefinition; | 
| 13 | - | |
| 14 | 13 | use Kaliop\eZMigrationBundle\API\ConfigResolverInterface; | 
| 15 | 14 | |
| 16 | 15 | /** | 
| @@ -6,7 +6,6 @@ | ||
| 6 | 6 | use Kaliop\eZMigrationBundle\Core\MigrationService; | 
| 7 | 7 | use Symfony\Component\Console\Input\InputInterface; | 
| 8 | 8 | use Symfony\Component\Console\Output\OutputInterface; | 
| 9 | -use Symfony\Component\Console\Input\InputOption; | |
| 10 | 9 | use Kaliop\eZMigrationBundle\API\Value\Migration; | 
| 11 | 10 | use Kaliop\eZMigrationBundle\API\Value\MigrationDefinition; | 
| 12 | 11 | |
| @@ -3,7 +3,6 @@ | ||
| 3 | 3 | namespace Kaliop\eZMigrationBundle\Core\Executor; | 
| 4 | 4 | |
| 5 | 5 | use eZ\Publish\API\Repository\Values\Content\Language; | 
| 6 | -use Kaliop\eZMigrationBundle\API\Collection\LanguageCollection; | |
| 7 | 6 | |
| 8 | 7 | /** | 
| 9 | 8 | * Handles language migrations. | 
| @@ -71,7 +71,9 @@ discard block | ||
| 71 | 71 |              if (!empty($sort)) { | 
| 72 | 72 | $query->sortClauses = $this->getSortClauses($sort); | 
| 73 | 73 | } | 
| 74 | - if (isset($query->performCount)) $query->performCount = false; | |
| 74 | +            if (isset($query->performCount)) { | |
| 75 | + $query->performCount = false; | |
| 76 | + } | |
| 75 | 77 | $query->filter = $this->getQueryCriterion($key, $values); | 
| 76 | 78 | $results = $this->repository->getSearchService()->findLocations($query); | 
| 77 | 79 | |
| @@ -218,7 +220,9 @@ discard block | ||
| 218 | 220 |      { | 
| 219 | 221 | $query = new LocationQuery(); | 
| 220 | 222 | $query->limit = self::INT_MAX_16BIT; | 
| 221 | - if (isset($query->performCount)) $query->performCount = false; | |
| 223 | +        if (isset($query->performCount)) { | |
| 224 | + $query->performCount = false; | |
| 225 | + } | |
| 222 | 226 | $query->filter = new Query\Criterion\ParentLocationId($parentLocationIds); | 
| 223 | 227 | |
| 224 | 228 | $results = $this->repository->getSearchService()->findLocations($query); | 
| @@ -103,7 +103,9 @@ discard block | ||
| 103 | 103 | $query = new Query(); | 
| 104 | 104 | $query->limit = $limit != 0 ? $limit : self::INT_MAX_16BIT; | 
| 105 | 105 | $query->offset = $offset; | 
| 106 | - if (isset($query->performCount)) $query->performCount = false; | |
| 106 | +                    if (isset($query->performCount)) { | |
| 107 | + $query->performCount = false; | |
| 108 | + } | |
| 107 | 109 | $query->filter = $this->getQueryCriterion($key, $values); | 
| 108 | 110 |                      if (!empty($sort)) { | 
| 109 | 111 | $query->sortClauses = $this->getSortClauses($sort); | 
| @@ -229,7 +231,9 @@ discard block | ||
| 229 | 231 |      { | 
| 230 | 232 | $query = new Query(); | 
| 231 | 233 | $query->limit = self::INT_MAX_16BIT; | 
| 232 | - if (isset($query->performCount)) $query->performCount = false; | |
| 234 | +        if (isset($query->performCount)) { | |
| 235 | + $query->performCount = false; | |
| 236 | + } | |
| 233 | 237 | $query->filter = new Query\Criterion\ParentLocationId($parentLocationIds); | 
| 234 | 238 | $results = $this->repository->getSearchService()->findContent($query); | 
| 235 | 239 | |
| @@ -269,7 +273,9 @@ discard block | ||
| 269 | 273 |      { | 
| 270 | 274 | $query = new Query(); | 
| 271 | 275 | $query->limit = self::INT_MAX_16BIT; | 
| 272 | - if (isset($query->performCount)) $query->performCount = false; | |
| 276 | +        if (isset($query->performCount)) { | |
| 277 | + $query->performCount = false; | |
| 278 | + } | |
| 273 | 279 | $query->filter = new Query\Criterion\ContentTypeIdentifier($contentTypeIdentifiers); | 
| 274 | 280 | // sort objects by depth, lower to higher, so that deleting them has less chances of failure | 
| 275 | 281 | // NB: we only do this in eZP versions that allow depth sorting on content queries | 
| @@ -297,7 +303,9 @@ discard block | ||
| 297 | 303 |      { | 
| 298 | 304 | $query = new Query(); | 
| 299 | 305 | $query->limit = self::INT_MAX_16BIT; | 
| 300 | - if (isset($query->performCount)) $query->performCount = false; | |
| 306 | +        if (isset($query->performCount)) { | |
| 307 | + $query->performCount = false; | |
| 308 | + } | |
| 301 | 309 | $query->filter = new Query\Criterion\ContentTypeId($contentTypeIds); | 
| 302 | 310 | // sort objects by depth, lower to higher, so that deleting them has less chances of failure | 
| 303 | 311 | // NB: we only do this in eZP versions that allow depth sorting on content queries | 
| @@ -329,8 +329,9 @@ | ||
| 329 | 329 |      { | 
| 330 | 330 | if (isset($step->dsl['references_type']) && $step->dsl['references_type'] == self::REFERENCE_TYPE_ARRAY && | 
| 331 | 331 | isset($step->dsl['references_allow_empty']) && $step->dsl['references_allow_empty'] == true | 
| 332 | - ) | |
| 333 | - return true; | |
| 332 | +        ) { | |
| 333 | + return true; | |
| 334 | + } | |
| 334 | 335 | return false; | 
| 335 | 336 | } | 
| 336 | 337 | |