Skip to content

Commit

Permalink
Merge pull request #4605 from neos/90/task/cleanup-nodemigrations
Browse files Browse the repository at this point in the history
TASK: Cleanup format and remove unused imports
  • Loading branch information
nezaniel authored Oct 16, 2023
2 parents 95008ba + 23c5c8a commit 9227deb
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 42 deletions.
3 changes: 1 addition & 2 deletions Neos.ContentRepository.Export/src/ImportServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ public function __construct(
private readonly ResourceRepository $resourceRepository,
private readonly ResourceManager $resourceManager,
private readonly PersistenceManagerInterface $persistenceManager,
)
{
) {
}

public function build(ContentRepositoryServiceFactoryDependencies $serviceFactoryDependencies): ImportService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ public function __construct(
private readonly PropertyConverter $propertyConverter,
private readonly EventStoreInterface $eventStore,
private readonly ContentStreamId $contentStreamId,
)
{
) {
}

public function runAllProcessors(\Closure $outputLineFn, bool $verbose = false): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ public function __construct(
private readonly ResourceManager $resourceManager,
private readonly PropertyMapper $propertyMapper,
private readonly ContentStreamId $contentStreamId,
)
{
) {
}

public function build(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

namespace Neos\ContentRepository\NodeMigration\Filter;

use Neos\ContentRepository\Core\ContentRepository;
use Neos\ContentRepository\Core\DimensionSpace\InterDimensionalVariationGraph;
use Neos\ContentRepository\Core\DimensionSpace\VariantType;
use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePointSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Neos\ContentRepository\NodeMigration\Transformation\TransformationsFactory;
use Neos\ContentRepository\Core\Feature\WorkspaceCreation\Command\CreateWorkspace;
use Neos\ContentRepository\Core\SharedModel\Exception\WorkspaceDoesNotExist;
use Neos\ContentRepository\Core\SharedModel\User\UserId;
use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceDescription;
use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName;
use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceTitle;
Expand Down Expand Up @@ -54,8 +53,7 @@ public function __construct(
private readonly ContentRepository $contentRepository,
private readonly FiltersFactory $filterFactory,
private readonly TransformationsFactory $transformationFactory
)
{
) {
}

public function executeMigration(ExecuteMigration $command): void
Expand Down Expand Up @@ -98,8 +96,7 @@ protected function executeSubMigrationAndBlock(
array $migrationDescription,
ContentStreamId $contentStreamForReading,
ContentStreamId $contentStreamForWriting
): void
{
): void {
$filters = $this->filterFactory->buildFilterConjunction($migrationDescription['filters'] ?? []);
$transformations = $this->transformationFactory->buildTransformation(
$migrationDescription['transformations'] ?? []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValue;
use Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues;
use Neos\ContentRepository\Core\SharedModel\User\UserId;

class AddNewPropertyTransformationFactory implements TransformationFactoryInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use Neos\ContentRepository\Core\Feature\NodeTypeChange\Dto\NodeAggregateTypeChangeChildConstraintConflictResolutionStrategy;
use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate;
use Neos\ContentRepository\Core\NodeType\NodeTypeName;
use Neos\ContentRepository\Core\SharedModel\User\UserId;
use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId;

/** @codingStandardsIgnoreStart */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId;
use Neos\ContentRepository\Core\Feature\NodeRemoval\Command\RemoveNodeAggregate;
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
use Neos\ContentRepository\Core\SharedModel\User\UserId;

/**
* Remove Node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use Neos\ContentRepository\Core\Feature\NodeRenaming\Command\ChangeNodeAggregateName;
use Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate;
use Neos\ContentRepository\Core\SharedModel\Node\NodeName;
use Neos\ContentRepository\Core\SharedModel\User\UserId;
use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId;

class RenameNodeAggregateTransformationFactory implements TransformationFactoryInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ class TransformationsFactory

public function __construct(
private readonly ContentRepository $contentRepository
)
{
) {
}

public function registerTransformation(string $transformationIdentifier, TransformationFactoryInterface $transformationFactory): self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ public function __construct(
private readonly EventPersister $eventPersister,
NodeTypeManager $nodeTypeManager,
InterDimensionalVariationGraph $interDimensionalVariationGraph,
)
{
) {
$projectedNodeIterator = new ProjectedNodeIterator(
$contentRepository->getWorkspaceFinder(),
$contentRepository->getContentGraph(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ public function __construct(
private readonly ContentRepositoryRegistry $contentRepositoryRegistry,
private readonly PackageManager $packageManager,
private readonly NodeMigrationGeneratorService $nodeMigrationGeneratorService
)
{
) {
parent::__construct();
}

Expand Down Expand Up @@ -98,20 +97,20 @@ public function executeCommand(string $version, string $workspace = 'live', bool
*/
public function kickstartCommand(string $packageKey): void
{
if (!$this->packageManager->isPackageAvailable($packageKey)) {
$this->outputLine('Package "%s" is not available.', [$packageKey]);
$this->quit(1);
if (!$this->packageManager->isPackageAvailable($packageKey)) {
$this->outputLine('Package "%s" is not available.', [$packageKey]);
$this->quit(1);
}

try {
$createdMigration = $this->nodeMigrationGeneratorService->generateBoilerplateMigrationFileInPackage($packageKey);
} catch (MigrationException $e) {
$this->outputLine();
$this->outputLine('Error ' . $e->getMessage());
$this->quit(1);
$this->outputLine();
$this->outputLine('Error ' . $e->getMessage());
$this->quit(1);
}
$this->outputLine($createdMigration);
$this->outputLine('Your node migration has been created successfully.');
$this->outputLine($createdMigration);
$this->outputLine('Your node migration has been created successfully.');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ protected function applyEditorLabels(
$editorName,
array &$editorOptions,
$translationIdGenerator
)
{
) {
switch ($editorName) {
case 'Neos.Neos/Inspector/Editors/SelectBoxEditor':
if ($this->shouldFetchTranslation($editorOptions, 'placeholder')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ class DoctrineEventStoreFactory implements EventStoreFactoryInterface
{
public function __construct(
private readonly Connection $connection,
)
{
) {
}

public function build(ContentRepositoryId $contentRepositoryId, array $options, ClockInterface $clock): EventStoreInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ public function __construct(
private ConfigurationManager $configurationManager,
private ObjectManagerBasedNodeLabelGeneratorFactory $nodeLabelGeneratorFactory,
private NodeTypeEnrichmentService $nodeTypeEnrichmentService,
)
{
) {
}

public function build(ContentRepositoryId $contentRepositoryId, array $options): NodeTypeManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ public static function synchronously(\Closure $fn): void
public function __construct(
private readonly ContentRepositoryId $contentRepositoryId,
private readonly SubprocessProjectionCatchUpTrigger $inner
)
{
) {
}

public function triggerCatchUp(Projections $projections): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ class SubprocessProjectionCatchUpTrigger implements ProjectionCatchUpTriggerInte

public function __construct(
private readonly ContentRepositoryId $contentRepositoryId
)
{
) {
}

public function triggerCatchUp(Projections $projections): void
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\ContentRepositoryRegistry\Service;

/*
Expand All @@ -25,8 +26,7 @@ class NodeMigrationGeneratorService

public function __construct(
private readonly PackageManager $packageManager
)
{
) {
}

/**
Expand Down

0 comments on commit 9227deb

Please sign in to comment.