Make first argument of define() string
class SomeClass
{
public function run(int $a)
{
- define(CONSTANT_2, 'value');
+ define('CONSTANT_2', 'value');
define('CONSTANT', 'value');
}
}
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\Php72\Rector\FuncCall\StringifyDefineRector;
return RectorConfig::configure()
->withRules([
StringifyDefineRector::class,
]);