Further modules included.
[yaffs-website] / web / modules / contrib / drupalmoduleupgrader / src / Plugin / DMU / Converter / Functions / FormStateDefaults.php
diff --git a/web/modules/contrib/drupalmoduleupgrader/src/Plugin/DMU/Converter/Functions/FormStateDefaults.php b/web/modules/contrib/drupalmoduleupgrader/src/Plugin/DMU/Converter/Functions/FormStateDefaults.php
new file mode 100644 (file)
index 0000000..191cb5d
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+
+namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\Functions;
+
+use Drupal\drupalmoduleupgrader\TargetInterface;
+use Pharborist\Functions\FunctionCallNode;
+
+/**
+ * @Converter(
+ *  id = "form_state_defaults",
+ *  description = @Translation("Rewrites calls to form_state_defaults().")
+ * )
+ */
+class FormStateDefaults extends FunctionCallModifier {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function rewrite(FunctionCallNode $call, TargetInterface $target) {
+    // @todo
+    // There are two possibilities here. If the call is part of a += operation
+    // or an array_merge() call, the entire thing needs to be commented out.
+    // Otherwise, it should be changed to 'new FormState()', which requires an
+    // upstream change in Pharborist.
+  }
+
+}