Skip to content

Commit

Permalink
Use new SetProviderInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-granados committed Sep 10, 2024
1 parent 61f5bab commit 44818c6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Set/PhpStaticAnalysisSetList.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use PhpStaticAnalysis\Attributes\Type;
use Rector\Set\Contract\SetListInterface;

final class PhpStaticAnalysisSetList implements SetListInterface
final class PhpStaticAnalysisSetList
{
#[Type('string')]
public const ANNOTATIONS_TO_ATTRIBUTES = __DIR__ . '/../../config/sets/php-static-analysis-annotations-to-attributes.php';
Expand Down
22 changes: 22 additions & 0 deletions src/Set/Provider/PhpStaticAnalysisSetProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

declare(strict_types=1);

namespace PhpStaticAnalysis\RectorRule\Set\Provider;

use PhpStaticAnalysis\Attributes\Returns;
use Rector\Set\Contract\SetInterface;
use Rector\Set\Contract\SetProviderInterface;
use Rector\Set\Enum\SetGroup;
use Rector\Set\ValueObject\Set;

final class PhpStaticAnalysisSetProvider implements SetProviderInterface
{
#[Returns('SetInterface[]')]
public function provide(): array
{
return [
new Set(SetGroup::ATTRIBUTES, 'Php Static Analysis Attributes', __DIR__ . '/../../../config/sets/php-static-analysis-annotations-to-attributes.php'),
];
}
}

0 comments on commit 44818c6

Please sign in to comment.