Move SetList to LubiSetList

This commit is contained in:
lubiana 2022-11-04 11:18:22 +01:00
parent 529210349a
commit a99023d484
No known key found for this signature in database
5 changed files with 25 additions and 8 deletions

View file

@ -1,3 +1,3 @@
# My configs for ECS and RECTOR # My very opiniated Configurations for Rector and ECS
This is just my very opiniated config for those tools so i dont habe to copy paste them in every new thing i code

View file

@ -1,6 +1,6 @@
<?php declare(strict_types=1); <?php declare(strict_types=1);
use Lubiana\CodeQuality\SetList; use Lubiana\CodeQuality\LubiSetList;
use Symplify\EasyCodingStandard\Config\ECSConfig; use Symplify\EasyCodingStandard\Config\ECSConfig;
return static function (ECSConfig $c): void { return static function (ECSConfig $c): void {
@ -11,5 +11,5 @@ return static function (ECSConfig $c): void {
__DIR__ . '/ecs.php', __DIR__ . '/ecs.php',
]); ]);
$c->sets([SetList::ECS]); $c->sets([LubiSetList::ECS]);
}; };

View file

@ -1,6 +1,6 @@
<?php declare(strict_types=1); <?php declare(strict_types=1);
use Lubiana\CodeQuality\SetList; use Lubiana\CodeQuality\LubiSetList;
use Rector\Config\RectorConfig; use Rector\Config\RectorConfig;
return static function (RectorConfig $c): void { return static function (RectorConfig $c): void {
@ -11,5 +11,5 @@ return static function (RectorConfig $c): void {
__DIR__ . '/ecs.php', __DIR__ . '/ecs.php',
]); ]);
$c->sets([SetList::RECTOR]); $c->sets([LubiSetList::RECTOR]);
}; };

10
src/LubiSetList.php Normal file
View file

@ -0,0 +1,10 @@
<?php declare(strict_types=1);
namespace Lubiana\CodeQuality;
final class LubiSetList
{
public const RECTOR = __DIR__ . '/../config/rector.php';
public const ECS = __DIR__ . '/../config/ecs.php';
}

View file

@ -2,9 +2,16 @@
namespace Lubiana\CodeQuality; namespace Lubiana\CodeQuality;
/** @deprecated use LubiSetList */
final class SetList final class SetList
{ {
public const RECTOR = __DIR__ . '/../config/rector.php'; /**
* @deprecated use LubiSetList::RECTOR
*/
public const RECTOR = LubiSetList::RECTOR;
public const ECS = __DIR__ . '/../config/ecs.php'; /**
* @deprecated use LubiSetList::ECS
*/
public const ECS = LubiSetList::ECS;
} }