diff --git a/rector.php b/rector.php index 672403ab..7b534e37 100644 --- a/rector.php +++ b/rector.php @@ -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; @@ -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', + ]]); }; diff --git a/src/Action/SFTP/Builder/Action.php b/src/Action/SFTP/Builder/Action.php index c20bc4d8..98aba4de 100644 --- a/src/Action/SFTP/Builder/Action.php +++ b/src/Action/SFTP/Builder/Action.php @@ -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, diff --git a/src/Builder/Workflow.php b/src/Builder/Workflow.php index 3ca024b5..6d868baf 100644 --- a/src/Builder/Workflow.php +++ b/src/Builder/Workflow.php @@ -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)), @@ -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)), @@ -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)), @@ -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)), diff --git a/src/Builder/Workflow/WorkflowRuntime.php b/src/Builder/Workflow/WorkflowRuntime.php index 890032ff..5100c839 100644 --- a/src/Builder/Workflow/WorkflowRuntime.php +++ b/src/Builder/Workflow/WorkflowRuntime.php @@ -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_( @@ -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_( diff --git a/src/Plugin/Batching/Service.php b/src/Plugin/Batching/Service.php index e8f86bdb..1c997c4d 100644 --- a/src/Plugin/Batching/Service.php +++ b/src/Plugin/Batching/Service.php @@ -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;