Skip to content

Commit

Permalink
fix string class name, skip a rector rule on files
Browse files Browse the repository at this point in the history
  • Loading branch information
JoMessina committed Dec 5, 2023
1 parent b2f33c8 commit d2d56dd
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
11 changes: 11 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
declare(strict_types=1);

use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\CodingStyle\Rector\String_\UseClassKeywordForClassNameResolutionRector;
use Rector\Config\RectorConfig;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\PHPUnit\Set\PHPUnitLevelSetList;
use Rector\Symfony\Set\SymfonyLevelSetList;
Expand All @@ -20,4 +22,13 @@
PHPUnitLevelSetList::UP_TO_PHPUNIT_100,
SymfonyLevelSetList::UP_TO_SYMFONY_60,
]);

$rectorConfig->skip([StringClassNameToClassConstantRector::class => [
__DIR__ . '/src/Plugin/Filtering/Builder/Drop.php',
__DIR__ . '/src/Plugin/Filtering/Builder/Reject.php',
__DIR__ . '/src/Plugin/SFTP/Builder/Extractor.php',
__DIR__ . '/src/Plugin/SFTP/Builder/Loader.php',
__DIR__ . '/src/Plugin/Batching/Builder/Fork.php',
__DIR__ . '/src/Plugin/Batching/Builder/Merge.php',
]]);
};
2 changes: 1 addition & 1 deletion src/Action/SFTP/Builder/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function withState(Node\Expr $state): self
public function getNode(): Node
{
return new Node\Expr\New_(
class: new Node\Name\FullyQualified('Kiboko\Component\Action\Flow\SFTP\UploadFile'),
class: new Node\Name\FullyQualified('Kiboko\\Component\\Action\\Flow\\SFTP\\UploadFile'),
args: [
new Node\Arg(
value: $this->host,
Expand Down
8 changes: 4 additions & 4 deletions src/Builder/Workflow.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function addPipeline(string $code, string $pipelineFilename): self
args: [
new Node\Arg(
new Node\Expr\StaticCall(
new Node\Name\FullyQualified('Kiboko\Component\Workflow\JobCode'),
new Node\Name\FullyQualified('Kiboko\\Component\\Workflow\\JobCode'),
new Node\Identifier('fromString'),
[
new Node\Arg(new Node\Scalar\String_($code)),
Expand All @@ -37,7 +37,7 @@ public function addPipeline(string $code, string $pipelineFilename): self
args: [
new Node\Arg(
new Node\Expr\StaticCall(
new Node\Name\FullyQualified('Kiboko\Component\Workflow\JobCode'),
new Node\Name\FullyQualified('Kiboko\\Component\\Workflow\\JobCode'),
new Node\Identifier('fromString'),
[
new Node\Arg(new Node\Scalar\String_($code)),
Expand Down Expand Up @@ -72,7 +72,7 @@ public function addAction(string $code, string $pipelineFilename): self
args: [
new Node\Arg(
new Node\Expr\StaticCall(
new Node\Name\FullyQualified('Kiboko\Component\Workflow\JobCode'),
new Node\Name\FullyQualified('Kiboko\\Component\\Workflow\\JobCode'),
new Node\Identifier('fromString'),
[
new Node\Arg(new Node\Scalar\String_($code)),
Expand All @@ -86,7 +86,7 @@ public function addAction(string $code, string $pipelineFilename): self
args: [
new Node\Arg(
new Node\Expr\StaticCall(
new Node\Name\FullyQualified('Kiboko\Component\Workflow\JobCode'),
new Node\Name\FullyQualified('Kiboko\\Component\\Workflow\\JobCode'),
new Node\Identifier('fromString'),
[
new Node\Arg(new Node\Scalar\String_($code)),
Expand Down
4 changes: 2 additions & 2 deletions src/Builder/Workflow/WorkflowRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ final class WorkflowRuntime implements Builder
public function getNode(): Node\Expr
{
return new Node\Expr\New_(
class: new Node\Name\FullyQualified('Kiboko\Component\Runtime\Workflow\Console'),
class: new Node\Name\FullyQualified('Kiboko\\Component\\Runtime\\Workflow\\Console'),
args: [
new Node\Arg(
value: new Node\Expr\New_(
Expand All @@ -21,7 +21,7 @@ class: new Node\Name\FullyQualified(\Symfony\Component\Console\Output\ConsoleOut
),
new Node\Arg(
new Node\Expr\New_(
class: new Node\Name\FullyQualified('Kiboko\Component\Pipeline\PipelineRunner'),
class: new Node\Name\FullyQualified('Kiboko\\Component\\Pipeline\\PipelineRunner'),
args: [
new Node\Arg(
value: new Node\Expr\New_(
Expand Down
1 change: 0 additions & 1 deletion src/Plugin/Batching/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Kiboko\Component\Satellite\Plugin\Batching;

// FIXME: hidden dependency to php-etl/fast-map
use Kiboko\Component\SatelliteToolbox\Builder\PropertyPathBuilder;
use Kiboko\Component\Satellite\ExpressionLanguage as Satellite;
use Kiboko\Component\Satellite\Plugin\Batching\Builder\Fork;
Expand Down

0 comments on commit d2d56dd

Please sign in to comment.