$this->buffer = '';
}
+ public function registerArgumentsSet(string $name, ...$args) {
+ $escapedName = var_export($name, 1);
+ $escapedArgs = implode(', ', array_map(function($arg) {
+ return var_export($arg, 1);
+ }, $args));
+ $this->buffer .= "registerArgumentsSet($escapedName, $escapedArgs);\n";
+ return $this;
+ }
+
+ /**
+ * @param string $for
+ * Ex: '\Civi\Core\SettingsBag::get()'
+ * @param int $index
+ * The positional offset among the arguments
+ * @param string $argumentSet
+ * Name of the argument set. (This should already be defined by `registerArgumentsSet()`.)
+ * @return $this
+ */
+ public function addExpectedArguments(string $for, int $index, string $argumentSet) {
+ $escapedSet = var_export($argumentSet, 1);
+ $this->buffer .= "expectedArguments($for, $index, argumentsSet($escapedSet));\n";
+ return $this;
+ }
+
/**
* @param string $for
* @param array $map