Skip to content

Commit

Permalink
Fix more code style
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Jan 21, 2025
1 parent 2be3217 commit 102f7f7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
23 changes: 11 additions & 12 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@

use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\Config\RectorConfig;
use Rector\Php84\Rector\Param\ExplicitNullableParamTypeRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\ValueObject\PhpVersion;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
return RectorConfig::configure()
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);

// register a single rule
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);

// define sets of rules
$rectorConfig->sets([
LevelSetList::UP_TO_PHP_80,
]);
};
])
->withRules([
InlineConstructorDefaultToPropertyRector::class,
ExplicitNullableParamTypeRector::class,
])
->withPhpSets(php80: true)
->withPhpVersion(PhpVersion::PHP_84);
2 changes: 1 addition & 1 deletion src/SymfonyEventDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(private PsrEventDispatcherInterface $dispatcher)
*
* @psalm-return T
*/
public function dispatch(object $event, string $eventName = null): object
public function dispatch(object $event, ?string $eventName = null): object
{
/** @psalm-var T */
return $this->dispatcher->dispatch($event);
Expand Down

0 comments on commit 102f7f7

Please sign in to comment.