3 namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\Functions;
5 use Drupal\drupalmoduleupgrader\TargetInterface;
6 use Pharborist\Functions\FunctionCallNode;
10 * id = "form_state_defaults",
11 * description = @Translation("Rewrites calls to form_state_defaults().")
14 class FormStateDefaults extends FunctionCallModifier {
19 public function rewrite(FunctionCallNode $call, TargetInterface $target) {
21 // There are two possibilities here. If the call is part of a += operation
22 // or an array_merge() call, the entire thing needs to be commented out.
23 // Otherwise, it should be changed to 'new FormState()', which requires an
24 // upstream change in Pharborist.