Skip to content

Commit

Permalink
[rector] Rector fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user authored and sebprt committed Jan 11, 2024
1 parent befc4bb commit 96216d4
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 16 deletions.
5 changes: 5 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
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 +21,8 @@
PHPUnitLevelSetList::UP_TO_PHPUNIT_100,
SymfonyLevelSetList::UP_TO_SYMFONY_60,
]);

$rectorConfig->skip([
StringClassNameToClassConstantRector::class
]);
};
2 changes: 1 addition & 1 deletion src/Builder/API/APIRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class: new Node\Name\FullyQualified('Kiboko\\Component\\Pipeline\\PipelineRunner
args: [
new Node\Arg(
value: new Node\Expr\New_(
class: new Node\Name\FullyQualified('Psr\\Log\\NullLogger')
class: new Node\Name\FullyQualified(\Psr\Log\NullLogger::class)
)
),
]
Expand Down
2 changes: 1 addition & 1 deletion src/Builder/Hook/HookRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class: new Node\Name\FullyQualified('Kiboko\\Component\\Pipeline\\PipelineRunner
args: [
new Node\Arg(
value: new Node\Expr\New_(
class: new Node\Name\FullyQualified('Psr\\Log\\NullLogger')
class: new Node\Name\FullyQualified(\Psr\Log\NullLogger::class)
)
),
]
Expand Down
4 changes: 2 additions & 2 deletions src/Builder/Pipeline/ConsoleRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class: new Node\Name\FullyQualified('Kiboko\\Component\\Runtime\\Pipeline\\Conso
args: [
new Node\Arg(
value: new Node\Expr\New_(
class: new Node\Name\FullyQualified('Symfony\\Component\\Console\\Output\\ConsoleOutput'),
class: new Node\Name\FullyQualified(\Symfony\Component\Console\Output\ConsoleOutput::class),
)
),
new Node\Arg(
Expand All @@ -29,7 +29,7 @@ class: new Node\Name\FullyQualified('Kiboko\\Component\\Pipeline\\PipelineRunner
args: [
new Node\Arg(
value: new Node\Expr\New_(
class: new Node\Name\FullyQualified('Psr\\Log\\NullLogger'),
class: new Node\Name\FullyQualified(\Psr\Log\NullLogger::class),
)
),
],
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 @@ -16,7 +16,7 @@ class: new Node\Name\FullyQualified('Kiboko\\Component\\Runtime\\Workflow\\Conso
args: [
new Node\Arg(
value: new Node\Expr\New_(
class: new Node\Name\FullyQualified('Symfony\\Component\\Console\\Output\\ConsoleOutput'),
class: new Node\Name\FullyQualified(\Symfony\Component\Console\Output\ConsoleOutput::class),
)
),
new Node\Arg(
Expand All @@ -25,7 +25,7 @@ class: new Node\Name\FullyQualified('Kiboko\\Component\\Pipeline\\PipelineRunner
args: [
new Node\Arg(
value: new Node\Expr\New_(
class: new Node\Name\FullyQualified('Psr\\Log\\NullLogger'),
class: new Node\Name\FullyQualified(\Psr\Log\NullLogger::class),
)
),
],
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/Batching/Builder/Fork.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class: new Node\Stmt\Class_(
name: null,
subNodes: [
'implements' => [
new Node\Name\FullyQualified('Kiboko\\Contract\\Pipeline\\TransformerInterface'),
new Node\Name\FullyQualified(\Kiboko\Contract\Pipeline\TransformerInterface::class),
],
'stmts' => [
new Node\Stmt\ClassMethod(
Expand Down
6 changes: 3 additions & 3 deletions src/Plugin/Batching/Builder/Merge.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ class: new Node\Stmt\Class_(
name: null,
subNodes: [
'implements' => [
new Node\Name\FullyQualified('Kiboko\\Contract\\Pipeline\\TransformerInterface'),
new Node\Name\FullyQualified('Kiboko\\Contract\\Pipeline\\FlushableInterface'),
new Node\Name\FullyQualified(\Kiboko\Contract\Pipeline\TransformerInterface::class),
new Node\Name\FullyQualified(\Kiboko\Contract\Pipeline\FlushableInterface::class),
],
'stmts' => [
new Node\Stmt\Property(
Expand Down Expand Up @@ -226,7 +226,7 @@ class: new Node\Name\FullyQualified('Kiboko\\Component\\Bucket\\AcceptanceResult
)
),
],
'returnType' => new Node\Name\FullyQualified('Kiboko\\Contract\\Bucket\\ResultBucketInterface'),
'returnType' => new Node\Name\FullyQualified(\Kiboko\Contract\Bucket\ResultBucketInterface::class),
],
),
],
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/FTP/Builder/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ class: new Node\Stmt\Class_(
'params' => [
new Node\Param(
var: new Node\Expr\Variable('logger'),
type: new Node\Name\FullyQualified(name: 'Psr\\Log\\LoggerInterface'),
type: new Node\Name\FullyQualified(name: \Psr\Log\LoggerInterface::class),
flags: Node\Stmt\Class_::MODIFIER_PRIVATE,
),
],
Expand Down Expand Up @@ -510,7 +510,7 @@ class: new Node\Name\FullyQualified('Kiboko\\Component\\Bucket\\ComplexResultBuc
],
),
args: [
new Node\Arg(value: $this->logger ?? new Node\Expr\New_(new Node\Name\FullyQualified('Psr\\Log\\NullLogger'))),
new Node\Arg(value: $this->logger ?? new Node\Expr\New_(new Node\Name\FullyQualified(\Psr\Log\NullLogger::class))),
]
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/Filtering/Builder/Drop.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function getNode(): Node
return new Node\Expr\New_(
class: new Node\Stmt\Class_(null, [
'implements' => [
new Node\Name\FullyQualified('Kiboko\\Contract\\Pipeline\\TransformerInterface'),
new Node\Name\FullyQualified(\Kiboko\Contract\Pipeline\TransformerInterface::class),
],
'stmts' => [
(new Builder\Method('transform'))
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/Filtering/Builder/Reject.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function getNode(): Node
return new Node\Expr\New_(
class: new Node\Stmt\Class_(null, [
'implements' => [
new Node\Name\FullyQualified('Kiboko\\Contract\\Pipeline\\TransformerInterface'),
new Node\Name\FullyQualified(\Kiboko\Contract\Pipeline\TransformerInterface::class),
],
'stmts' => [
(new Builder\Method('transform'))
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/SFTP/Builder/Extractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class: new Node\Stmt\Class_(
name: null,
subNodes: [
'implements' => [
new Node\Name\FullyQualified('Kiboko\\Contract\\Pipeline\\LoaderInterface'),
new Node\Name\FullyQualified(\Kiboko\Contract\Pipeline\LoaderInterface::class),
],
'stmts' => [
new Node\Stmt\ClassMethod(
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/SFTP/Builder/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class: new Node\Stmt\Class_(
name: null,
subNodes: [
'implements' => [
new Node\Name\FullyQualified('Kiboko\\Contract\\Pipeline\\LoaderInterface'),
new Node\Name\FullyQualified(\Kiboko\Contract\Pipeline\LoaderInterface::class),
],
'stmts' => [
new Node\Stmt\ClassMethod(
Expand Down

0 comments on commit 96216d4

Please sign in to comment.