mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-05 02:40:50 +00:00
53742c371b
70fa502a59
[CodeQuality] Skip private static call from static:: on LocallyCalledStaticMethodToNonStaticRector (#5620)
48 lines
3.6 KiB
PHP
48 lines
3.6 KiB
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace RectorPrefix202402;
|
|
|
|
use Rector\Config\RectorConfig;
|
|
use Rector\Doctrine\CodeQuality\AttributeTransformer\ClassAttributeTransformer\EmbeddableClassAttributeTransformer;
|
|
use Rector\Doctrine\CodeQuality\AttributeTransformer\ClassAttributeTransformer\EntityClassAttributeTransformer;
|
|
use Rector\Doctrine\CodeQuality\AttributeTransformer\ClassAttributeTransformer\InheritanceClassAttributeTransformer;
|
|
use Rector\Doctrine\CodeQuality\AttributeTransformer\ClassAttributeTransformer\SoftDeletableClassAttributeTransformer;
|
|
use Rector\Doctrine\CodeQuality\AttributeTransformer\ClassAttributeTransformer\TableClassAttributeTransformer;
|
|
use Rector\Doctrine\CodeQuality\AttributeTransformer\PropertyAttributeTransformer\ColumnAttributeTransformer;
|
|
use Rector\Doctrine\CodeQuality\AttributeTransformer\PropertyAttributeTransformer\EmbeddedPropertyAttributeTransformer;
|
|
use Rector\Doctrine\CodeQuality\AttributeTransformer\PropertyAttributeTransformer\GedmoTimestampableAttributeTransformer;
|
|
use Rector\Doctrine\CodeQuality\AttributeTransformer\PropertyAttributeTransformer\IdAttributeTransformer;
|
|
use Rector\Doctrine\CodeQuality\AttributeTransformer\PropertyAttributeTransformer\IdColumnAttributeTransformer;
|
|
use Rector\Doctrine\CodeQuality\AttributeTransformer\PropertyAttributeTransformer\IdGeneratorAttributeTransformer;
|
|
use Rector\Doctrine\CodeQuality\AttributeTransformer\PropertyAttributeTransformer\JoinColumnAttributeTransformer;
|
|
use Rector\Doctrine\CodeQuality\AttributeTransformer\PropertyAttributeTransformer\ManyToOneAttributeTransformer;
|
|
use Rector\Doctrine\CodeQuality\AttributeTransformer\PropertyAttributeTransformer\OneToManyAttributeTransformer;
|
|
use Rector\Doctrine\CodeQuality\AttributeTransformer\PropertyAttributeTransformer\OrderByAttributeTransformer;
|
|
use Rector\Doctrine\CodeQuality\AttributeTransformer\YamlToAttributeTransformer;
|
|
use Rector\Doctrine\CodeQuality\Contract\ClassAttributeTransformerInterface;
|
|
use Rector\Doctrine\CodeQuality\Contract\PropertyAttributeTransformerInterface;
|
|
return static function (RectorConfig $rectorConfig) : void {
|
|
$rectorConfig->autotagInterface(ClassAttributeTransformerInterface::class);
|
|
$rectorConfig->autotagInterface(PropertyAttributeTransformerInterface::class);
|
|
// for yaml to class attribute transformer
|
|
$rectorConfig->singleton(EntityClassAttributeTransformer::class);
|
|
$rectorConfig->singleton(SoftDeletableClassAttributeTransformer::class);
|
|
$rectorConfig->singleton(TableClassAttributeTransformer::class);
|
|
$rectorConfig->singleton(EmbeddableClassAttributeTransformer::class);
|
|
$rectorConfig->singleton(InheritanceClassAttributeTransformer::class);
|
|
// for yaml to property attribute transformer
|
|
$rectorConfig->singleton(ColumnAttributeTransformer::class);
|
|
$rectorConfig->singleton(EmbeddedPropertyAttributeTransformer::class);
|
|
$rectorConfig->singleton(GedmoTimestampableAttributeTransformer::class);
|
|
$rectorConfig->singleton(IdAttributeTransformer::class);
|
|
$rectorConfig->singleton(IdColumnAttributeTransformer::class);
|
|
$rectorConfig->singleton(IdGeneratorAttributeTransformer::class);
|
|
$rectorConfig->singleton(ManyToOneAttributeTransformer::class);
|
|
$rectorConfig->singleton(OneToManyAttributeTransformer::class);
|
|
$rectorConfig->singleton(JoinColumnAttributeTransformer::class);
|
|
$rectorConfig->singleton(OrderByAttributeTransformer::class);
|
|
$rectorConfig->when(YamlToAttributeTransformer::class)->needs('$classAttributeTransformers')->giveTagged(ClassAttributeTransformerInterface::class);
|
|
$rectorConfig->when(YamlToAttributeTransformer::class)->needs('$propertyAttributeTransformers')->giveTagged(PropertyAttributeTransformerInterface::class);
|
|
};
|