Try Rector
Docs
Hire Team
Find Rule
Blog
Contact
AST
Try Rector
Docs
Hire Team
Find Rule
Blog
Contact
AST
Rector run Failed:
{ "totals": { "changed_files": 0, "errors": 1 }, "errors": [ { "message": "System error: \"Call to a member function isNull() on null\"\nRun Rector with \"--debug\" option and post the report here: https://github.com/rectorphp/rector/issues/new", "file": "/var/www/storage/demo/x2omz0elqq6xpu433x4x/rector_analyzed_file.php", "line": 120 } ] }
Run Rector on your code to see what it can do for you:
PHP snippet to change
<?php class NotZeroPosition { public function go() { $this->run([], ['item1', 'item2']); } private function run(array $data, array $items) { } }
Config
rector.php
<?php declare(strict_types=1); use Rector\Config\RectorConfig; use Rector\TypeDeclarationDocblocks\Rector\Class_\ClassMethodArrayDocblockParamFromLocalCallsRector; return static function (RectorConfig $rectorConfig): void { $rectorConfig->rule(ClassMethodArrayDocblockParamFromLocalCallsRector::class); };
Run Rector
Rector version:
9d02f9
- released at 2026-01-29 17:51