Skip to content

Commit

Permalink
TASK: Fix documentation and format
Browse files Browse the repository at this point in the history
  • Loading branch information
dlubitz committed Nov 21, 2024
1 parent 120f413 commit 8e9e6b3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ final class NodeGetContextGetWorkspaceNameRector extends AbstractRector

public function __construct(
private readonly NodesToAddCollector $nodesToAddCollector
)
{
) {
}

public function getRuleDefinition(): RuleDefinition
{
return CodeSampleLoader::fromFile('"NodeInterface::getContext()::getWorkspace()" will be rewritten', __CLASS__);
return CodeSampleLoader::fromFile('"NodeInterface::getContext()::getWorkspaceName()" will be rewritten', __CLASS__);
}

/**
Expand Down
13 changes: 7 additions & 6 deletions src/ContentRepository90/Rules/NodeGetDimensionsRector.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

declare (strict_types=1);

namespace Neos\Rector\ContentRepository90\Rules;

use Neos\Rector\Utility\CodeSampleLoader;
Expand All @@ -16,26 +17,26 @@ final class NodeGetDimensionsRector extends AbstractRector

public function __construct(
private readonly NodesToAddCollector $nodesToAddCollector
)
{
) {
}

public function getRuleDefinition() : RuleDefinition
public function getRuleDefinition(): RuleDefinition
{
return CodeSampleLoader::fromFile('"NodeInterface::getChildNodes()" will be rewritten', __CLASS__);
return CodeSampleLoader::fromFile('"NodeInterface::getDimensions()" will be rewritten', __CLASS__);
}

/**
* @return array<class-string<Node>>
*/
public function getNodeTypes() : array
public function getNodeTypes(): array
{
return [\PhpParser\Node\Expr\MethodCall::class];
}

/**
* @param \PhpParser\Node\Expr\MethodCall $node
*/
public function refactor(Node $node) : ?Node
public function refactor(Node $node): ?Node
{
assert($node instanceof Node\Expr\MethodCall);

Expand Down

0 comments on commit 8e9e6b3

Please sign in to comment.