Add a namespace to the file and replace the function call in the specified directory with a function call in the specified namespace
composer require ajiho/namespaceify
Use special use cases to demonstrate usage
$filename = dirname(__DIR__) . '/vendor/cakephp/core/functions.php';
$pkgDir = dirname(__DIR__) . '/vendor/cakephp';
$parser = new \ajiho\namespaceify\Parser($pkgDir, $filename, 'Cake\Core');
$parser->run();
$filename = dirname(__DIR__) . '/vendor/illuminate/support/helpers.php';
$pkgDir = dirname(__DIR__) . '/vendor/illuminate';
$parser = new \ajiho\namespaceify\Parser($pkgDir, $filename, 'Illuminate\Support');
$parser->run();