public function performEdit(EditorBuffer $buffer) { foreach ($this->getLinesVariableIsUsedOn() as $line) { $buffer->replaceString($line, $this->oldName->getToken(), $this->newName->getToken()); } }
public static function variableNotLocal(Variable $variable) { return new self(sprintf('Given variable "%s" is required to be local to the current method.', $variable->getToken())); }