Skip to content

Commit

Permalink
[automated] Update Rector Dependencies (#2676)
Browse files Browse the repository at this point in the history
* [automated] Update Rector Dependencies

* fix

---------

Co-authored-by: TomasVotruba <[email protected]>
Co-authored-by: Abdul Malik Ikhsan <[email protected]>
  • Loading branch information
3 people authored Nov 15, 2024
1 parent ef00082 commit a4b9dee
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,7 @@ parameters:
-
message: '#Cannot call method format\(\) on Carbon\\Carbon\|null#'
path: src/Controller/Stats/FindRuleStatsController.php

-
message: '#Call to an undefined method Rector\\Contract\\Rector\\RectorInterface\:\:getRuleDefinition\(\)#'
path: src/FileSystem/RectorFinder.php
5 changes: 5 additions & 0 deletions src/FileSystem/RectorFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ private function findInDirectoriesAndCreateRuleMetadatas(array $directories, arr

$rector = $rectorReflectionClass->newInstanceWithoutConstructor();

// only list rules with rule definition
if (! method_exists($rector, 'getRuleDefinition')) {
continue;
}

/** @var RectorInterface $rector */
$ruleDefinition = $rector->getRuleDefinition();
$ruleDefinition->setRuleClass($rectorClass);
Expand Down

0 comments on commit a4b9dee

Please sign in to comment.