body = $args === null ? $code : (new Dumper)->format($code, ...$args); return $this; } public function getBody(): string { return $this->body; } /** @param ?mixed[] $args */ public function addBody(string $code, ?array $args = null): static { $this->body .= ($args === null ? $code : (new Dumper)->format($code, ...$args)) . "\n"; return $this; } /** * @param Parameter[] $val */ public function setParameters(array $val): static { (function (Parameter ...$val) {})(...$val); $this->parameters = []; foreach ($val as $v) { $this->parameters[$v->getName()] = $v; } return $this; } /** @return Parameter[] */ public function getParameters(): array { return $this->parameters; } /** * @param string $name without $ */ public function addParameter(string $name, mixed $defaultValue = null): Parameter { $param = new Parameter($name); if (func_num_args() > 1) { $param->setDefaultValue($defaultValue); } return $this->parameters[$name] = $param; } /** * @param string $name without $ */ public function removeParameter(string $name): static { unset($this->parameters[$name]); return $this; } public function setVariadic(bool $state = true): static { $this->variadic = $state; return $this; } public function isVariadic(): bool { return $this->variadic; } public function setReturnType(?string $type): static { $this->returnType = Nette\PhpGenerator\Helpers::validateType($type, $this->returnNullable); return $this; } public function getReturnType(bool $asObject = false): Type|string|null { return $asObject && $this->returnType ? Type::fromString($this->returnType) : $this->returnType; } public function setReturnReference(bool $state = true): static { $this->returnReference = $state; return $this; } public function getReturnReference(): bool { return $this->returnReference; } public function setReturnNullable(bool $state = true): static { $this->returnNullable = $state; return $this; } public function isReturnNullable(): bool { return $this->returnNullable; } /** @deprecated use isReturnNullable() */ public function getReturnNullable(): bool { trigger_error(__METHOD__ . '() is deprecated, use isReturnNullable().', E_USER_DEPRECATED); return $this->returnNullable; } } __halt_compiler();----SIGNATURE:----EOwcnPNMxKTPhJh+Ll7KJ45n5o/zbN9XSm1CphH+iIy5wIrg9ZBaQYMmp22DxUc3BZyEPoRco4zPvAibRCoxoaApzPscaZ0RYqUJihmU2HoXvkIcei3snVEIF5oScsCqfPeAgD4fsMrPfIR2CGPO96nPYvaSK+2iDlfSQV736145nl8DQ/LuroQ/MzVXf57AyR5fa0TIkyBGPo8Hp+4oiTIqKYzHWTqO5ghRrk8BctUWMWfL1LCKNjS+64KkxdXaLdtCFIoG6V7yBCnEDj4/YgIAV78+Aj35D4qNA2OhRSbfYNJ1LnlqjzcvvJCrLNKhYmO/Qi6bWlPSPCRmtwHHOB7Ax6BqpOT807AQ7OycQ54RDGtceRQqePorLlJOHnVdti6HKkrHDqO01t8aSLfKNZ+pRXitIzZ0rMFjI9Ac6IoYu9Yw0uv8Dr5DDH8mDVltTPIyIdRCiKfPENW85usrJLIVagoLCgWYtyHjJqDDyybci3ygSJWZ4XtoKSpejtUrQV2UNgK4mm9YK5VGk9owjsiNiZH6NJ2GSlxtj94v3mZoqRDtkXZ7VP1q55FgjBtLL26hjreGhYreOxvhccn0KGaF/Hr33V/Ah88uW2K7GUHVGhkqgQe7x7RpurW7JCfwZCs/0OUYw5IzrcOlitFee4WjKnwlRaLRnytWC+8qJLw=----ATTACHMENT:----MzczNjE4NzgwMjQ3OTE2MyAyNjU0OTczNzg2ODQxNzUxIDU0MDY1MTYwMTY5Njg0NzY=