mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-10-28 23:56:47 +09:00
* 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`
30 lines
750 B
PHP
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);
|