for example, there is now a file with the content
class Foo
{
public function __construct() {
}
public function a() {}
}
I want to change the contents of the file to
class Foo
{
protected $var;
public function __construct() {
}
public function a() {}
public function b() {}
}
How can be implemented in code? How do you navigate to the location where you want to add the string?