Skip to content

Commit

Permalink
Rector updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mbabker committed Dec 13, 2024
1 parent dc6787b commit ec7f1e7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 0 additions & 2 deletions lib/Twig/Tests/View/TwigViewIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Pagerfanta\Twig\Extension\PagerfantaRuntime;
use Pagerfanta\Twig\View\TwigView;
use Pagerfanta\View\ViewFactory;
use Pagerfanta\View\ViewFactoryInterface;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Twig\Environment;
Expand All @@ -24,7 +23,6 @@
*/
final class TwigViewIntegrationTest extends TestCase
{
public ViewFactoryInterface $viewFactory;
public RouteGeneratorFactoryInterface $routeGeneratorFactory;
public Environment $twig;

Expand Down
21 changes: 12 additions & 9 deletions rector.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<?php declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\PHPUnit\CodeQuality\Rector\Class_\NarrowUnusedSetUpDefinedPropertyRector;

// NarrowUnusedSetUpDefinedPropertyRector
return RectorConfig::configure()
->withPaths([
__DIR__.'/lib',
])
->withSkip([
/*
* Skip selected rules in selected files
*/

NarrowUnusedSetUpDefinedPropertyRector::class => [
__DIR__.'/lib/Twig/Tests/View/TwigViewIntegrationTest.php', // Tries to inline the route generator factory which is used in the mocked runtime loader
]
])
->withImportNames(importShortClasses: false)
->withPHPStanConfigs([__DIR__.'/phpstan.neon'])
->withPreparedSets(codeQuality: true)
->withSets([
DoctrineSetList::DOCTRINE_DBAL_30,
DoctrineSetList::DOCTRINE_ORM_214,
PHPUnitSetList::PHPUNIT_100,
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
])
->withPreparedSets(codeQuality: true, phpunitCodeQuality: true)
;

0 comments on commit ec7f1e7

Please sign in to comment.