forked from easybill/zugferd-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rector.php
40 lines (33 loc) · 1.37 KB
/
rector.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
declare(strict_types=1);
/*
* This file is part of the ZUGFeRD PHP package.
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
use Rector\Config\RectorConfig;
use Rector\Php80\Rector\Class_\AnnotationToAttributeRector;
use Rector\Php80\ValueObject\AnnotationToAttribute;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
return static function (RectorConfig $config): void {
$config->importShortClasses();
$config->importNames();
$config->paths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);
$config->import(LevelSetList::UP_TO_PHP_80);
$config->import(SetList::CODE_QUALITY);
$config->ruleWithConfiguration(AnnotationToAttributeRector::class, [
new AnnotationToAttribute('JMS\Serializer\Annotation\SerializedName'),
new AnnotationToAttribute('JMS\Serializer\Annotation\Type'),
new AnnotationToAttribute('JMS\Serializer\Annotation\XmlValue'),
new AnnotationToAttribute('JMS\Serializer\Annotation\XmlAttribute'),
new AnnotationToAttribute('JMS\Serializer\Annotation\XmlElement'),
new AnnotationToAttribute('JMS\Serializer\Annotation\XmlList'),
new AnnotationToAttribute('JMS\Serializer\Annotation\XmlRoot'),
new AnnotationToAttribute('JMS\Serializer\Annotation\XmlNamespace'),
]);
};