You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello, if I try to edit a file, I have no way to keep a method and overwrite others, as there is "setMethods" which does a $methods = [].
I think there may be a setMethod() or overwriteMethod() that allows to add without deleting everything.
// copied from addMethod
public function setMethod(Method $method): static
{
$lower = strtolower($method->getName());
if (isset($this->methods[$lower])) {
throw new Nette\InvalidStateException("Cannot add method '$name', because it already exists.");
}
if (!$this->isInterface()) {
$method->setPublic();
}
return $this->methods[$lower] = $method;
}
This problem arose when doing a diff between the methods of a class.
I think it is important to have automatically generated files that can be edited by the programmer and the generator without losing data.
The text was updated successfully, but these errors were encountered:
hello, if I try to edit a file, I have no way to keep a method and overwrite others, as there is "setMethods" which does a $methods = [].
I think there may be a setMethod() or overwriteMethod() that allows to add without deleting everything.
This problem arose when doing a diff between the methods of a class.
I think it is important to have automatically generated files that can be edited by the programmer and the generator without losing data.
The text was updated successfully, but these errors were encountered: