xref: /plugin/aichat/vendor/mehrab-wj/tiktoken-php/rector.php (revision 8817535b0c67f8b10e9b8c05dcdf58fc17827423)
1*8817535bSAndreas Gohr<?php
2*8817535bSAndreas Gohr
3*8817535bSAndreas Gohrdeclare(strict_types=1);
4*8817535bSAndreas Gohr
5*8817535bSAndreas Gohruse Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
6*8817535bSAndreas Gohruse Rector\Config\RectorConfig;
7*8817535bSAndreas Gohruse Rector\Set\ValueObject\LevelSetList;
8*8817535bSAndreas Gohruse Rector\Set\ValueObject\SetList;
9*8817535bSAndreas Gohr
10*8817535bSAndreas Gohrreturn static function (RectorConfig $rectorConfig): void {
11*8817535bSAndreas Gohr    $rectorConfig->paths([
12*8817535bSAndreas Gohr        __DIR__.'/src',
13*8817535bSAndreas Gohr    ]);
14*8817535bSAndreas Gohr
15*8817535bSAndreas Gohr    // register a single rule
16*8817535bSAndreas Gohr    $rectorConfig->rules([
17*8817535bSAndreas Gohr        InlineConstructorDefaultToPropertyRector::class,
18*8817535bSAndreas Gohr    ]);
19*8817535bSAndreas Gohr
20*8817535bSAndreas Gohr    $rectorConfig->sets([
21*8817535bSAndreas Gohr        LevelSetList::UP_TO_PHP_81,
22*8817535bSAndreas Gohr        SetList::CODE_QUALITY,
23*8817535bSAndreas Gohr    ]);
24*8817535bSAndreas Gohr};
25