registerArgument('array', 'array', 'Array to add value to'); $this->registerArgument('key', 'string', 'Key to add value by', true); $this->registerArgument('value', 'mixed', 'Value to add'); } public function render(): array { $array = $this->arguments['array'] ?: []; $key = $this->arguments['key']; $value = !is_null($this->arguments['value']) ? $this->arguments['value'] : $this->renderChildren(); return array_merge($array, [$key => $value]); } }