Files
FOSSBilling/rector.php
Adam Daley a9b903c222 Codebase modernisation, configuration cleanup, and improved type safety (#2957)
* Refactor tests to replace depreciated functions

* Update Rector config and dependencies

* Rector: Add explicit string casting for stricter type safety

* Rector: Add return type hints to methods across codebase

* Rector: Increase dead code level and refactor invoice item logic

* Remove unnecessary `willReturn` from test mocks

Eliminate redundant `willReturn(null)` and similar calls from PHPUnit mock setups in legacy module tests, leaving only method expectations. Also update some test values to use floats for consistency.

* Refactor API controller and email adapter return values

* Update formatting and guidelines in `AGENTS.md`
2025-10-11 23:39:44 +01:00

30 lines
750 B
PHP

<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\PHPUnit\Set\PHPUnitSetList;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
__DIR__ . '/tests-legacy'
])
->withSkip([
__DIR__ . '/src/vendor',
__DIR__ . '/src/data/cache',
])
->withAttributesSets()
->withPhpSets()
->withSets([
DoctrineSetList::DOCTRINE_CODE_QUALITY,
PHPUnitSetList::PHPUNIT_110,
])
->withTypeCoverageLevel(30)
->withDeadCodeLevel(30)
->withCache('./cache/rector', FileCacheStorage::class)
->withParallel(120, 8, 10);