Turn defined function call to static method call
-view("...", []);
+SomeClass::render("...", []);
Configure your rector.php:
<?php
use Rector\Config\RectorConfig;
use Rector\Transform\Rector\FuncCall\FuncCallToStaticCallRector;
use Rector\Transform\ValueObject\FuncCallToStaticCall;
return RectorConfig::configure()
->withConfiguredRule(FuncCallToStaticCallRector::class, [
new FuncCallToStaticCall('view', 'SomeStaticClass', 'render'),
]);