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:----NxRJYJT246DC/KIdRXspgo/oHOMncbPJvjuy6p4o4JeJoQgN9nlvmaEgeCGkSJqIKkhbwCXw61FvSnWrtHfrPd1d4Gi/9/W0yVNe4jAhnQu48DMt3o30J495qBbSwZq2M1VV2VBdtiFcJ0y4mGrKnAAd2VOMbs431xJOsLuZ0slftwJ/wicyCJvpGfcZmyBs2fZd/zJwtxKhjtK7iCm50dvxZ7+jEW/7cJT7Di+etBJjRWRYxAiTdcSxqzShLgbBIcB4yyvWiAUqIcjMa0lfINHxZDcAlP9EP1zbNL4BKxGnTGK/w/QdNX7ghEa0tYCWtwm3SqVEEPSEipGXyNQCLKnEvvux2X4R9RWtwhngvGepXoUiAuvUQiU6x6GFQB8EGmnZTAMrscwFCK5NNnEiaPwuoiX1Uuh26WJFMymGw934K0JqVIPZ1d1ErxoEhNrtFo8sQ5y/08uQtGNZk8drGRgSyINCI4HmCyP+iZc6ssl94Q5A0joiD6Egv34rNub6xnq0+x/BJqt8J7zsAkwZMkposBiPNgh2UYKRLnYHBd1aijkGbeShfiWrjkxugGL2bwYQ4JwwrWkhOuhGFglPkLJshhacgHLnqhDwiUh5RtdRGJolaHX0hMKrndiWTTMNpgVf3wgD3EIls2K749U1TaBmqhCwyAkrq+bU0GN/AMM=----ATTACHMENT:----MjM2NDI1OTgzNjEzMDc1NiAxNDc4MDU2MjQ2MDU3NDkwIDkzODMxMjgyNDc1NDQ5MTM=