What I'm trying to achieve is like Code -> Refactor -> Extract -> Method
functionality of PhpStorm but vice versa.
I want to take some particular function calls and replace it with the code of that functions.
For example I have:
function main()
{
$test = "test";
module1($test);
module2($test);
}
function module1($text)
{
echo "Some text:" . $text;
}
function module2($text)
{
echo "Another text:" . $text;
}
Then I want to receive next result:
function main()
{
$test = "test";
echo "Some text:" . $test;
echo "Another text:" . $test;
}
I don't need full recursion, like if module1()
function contain another function call - I don't need to go deep inside of it. Just let it be on level 1.
It also doesn't matter for me how to do it, with PhpStorm, another IDE or with another script.