mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-09 05:24:58 +09:00
* Update rector config to include tests * Run Rector against the tests * Delete test-results * Update .gitignore * Correctly set the PHP min to 8.1, split the configs * Corrected PHPDoc * Deleted tests we can't really get to pass PHPunit is hard-coded to fail when a class has a return type of `never`, which is the correct return type of our redirect function (and rightfully so). No way to disable the exception as far as we can tell
29 lines
885 B
PHP
29 lines
885 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Rector\Php54\Rector\Array_\LongArrayToShortArrayRector;
|
|
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
|
|
use Rector\Config\RectorConfig;
|
|
use Rector\Set\ValueObject\LevelSetList;
|
|
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
|
|
|
|
return static function (RectorConfig $rectorConfig): void {
|
|
$rectorConfig->paths([
|
|
__DIR__ . '/src',
|
|
]);
|
|
|
|
$rectorConfig->skip([
|
|
__DIR__ . '/src/vendor',
|
|
__DIR__ . '/src/data/cache',
|
|
JsonThrowOnErrorRector::class,
|
|
LongArrayToShortArrayRector::class, // As much as I'd like to use this, Rector will destroy the formatting of large, multi-line arrays when it applies this & PHP-CS-Fixer doesn't fix it.
|
|
NullToStrictStringFuncCallArgRector::class,
|
|
]);
|
|
|
|
|
|
$rectorConfig->sets([
|
|
LevelSetList::UP_TO_PHP_81,
|
|
]);
|
|
};
|