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:----NpulckO8pez4vC6ehOEF0H0g0x8+c5sux6jKbpFaDC2A6TAH9GgNqN8yT5as6dAJG0c5l6i/g9i/IoWay3Gsh5cMEb72RroBxgQC1kibhUbiqDsVykCSaV8+GcEDdaIZWfhCmwUZrz/ft3EH83mTuiU4zN1OmuHvgyYHXEduwo+hjyD6PqkVAYvpmdaOTro4vAc7JpkxjPtmUh37IAJ7KaL1f1lSfE//lcj129LcrrU9tsfdo4/GxCEolEJq6I3Ld30K6fMGy3DPz5P074qwLMoq4rpnyqqe+JLfQ0czwAtaegMsRohFUinzf2tvp32Tby8x+HCw+d6CGcOSVr9YwrAyvhhUrcoyO4gRDI/pJzhYixbbRdIZb6sTqgHoFmKYNHKdjDp8TsGhEDTgLei7ytFg8Tm76YTwrW+E0dADwXJolB8k/CcjSZ2o4bbmY1ccUDDPQOjpxRKSmVdXG+VVuzdnYJSk7CPhID+Sqb1ag6bKL4TQM7gW5hh32sKX5YQbD7cxz6Fqov2PM2/+znH6+Lcy/EoiCQykN2qGxGQd22NAnElM++0PHteVHBvCglt5b8qw5AJIJqKBvH5nv1VnRIEJz3pBrAnzRx+xljVv75pv5nBinReTgAyHDREVulajJ6Loq2xgs1OCHKGTL1Q+y8BikHMptaVLsVcg5NJC5+Y=----ATTACHMENT:----MTQ5NDE5MTI5MDAxMjY3NiAyMzk5NTk2NTY3NzAyNjIzIDI2NDk3MDU2MTQ2NDI1Mzg=