fromCode($code); } public function addClass(string $name): ClassType { return $this ->addNamespace(Helpers::extractNamespace($name)) ->addClass(Helpers::extractShortName($name)); } public function addInterface(string $name): InterfaceType { return $this ->addNamespace(Helpers::extractNamespace($name)) ->addInterface(Helpers::extractShortName($name)); } public function addTrait(string $name): TraitType { return $this ->addNamespace(Helpers::extractNamespace($name)) ->addTrait(Helpers::extractShortName($name)); } public function addEnum(string $name): EnumType { return $this ->addNamespace(Helpers::extractNamespace($name)) ->addEnum(Helpers::extractShortName($name)); } public function addNamespace(string|PhpNamespace $namespace): PhpNamespace { $res = $namespace instanceof PhpNamespace ? ($this->namespaces[$namespace->getName()] = $namespace) : ($this->namespaces[$namespace] ??= new PhpNamespace($namespace)); foreach ($this->namespaces as $namespace) { $namespace->setBracketedSyntax(count($this->namespaces) > 1 && isset($this->namespaces[''])); } return $res; } public function addFunction(string $name): GlobalFunction { return $this ->addNamespace(Helpers::extractNamespace($name)) ->addFunction(Helpers::extractShortName($name)); } /** * @return PhpNamespace[] */ public function getNamespaces(): array { return $this->namespaces; } /** * @return ClassLike[] */ public function getClasses(): array { $classes = []; foreach ($this->namespaces as $n => $namespace) { $n .= $n ? '\\' : ''; foreach ($namespace->getClasses() as $c => $class) { $classes[$n . $c] = $class; } } return $classes; } /** * @return GlobalFunction[] */ public function getFunctions(): array { $functions = []; foreach ($this->namespaces as $n => $namespace) { $n .= $n ? '\\' : ''; foreach ($namespace->getFunctions() as $f => $function) { $functions[$n . $f] = $function; } } return $functions; } public function addUse(string $name, ?string $alias = null, string $of = PhpNamespace::NameNormal): static { $this->addNamespace('')->addUse($name, $alias, $of); return $this; } /** * Adds declare(strict_types=1) to output. */ public function setStrictTypes(bool $on = true): static { $this->strictTypes = $on; return $this; } public function hasStrictTypes(): bool { return $this->strictTypes; } /** * @deprecated use hasStrictTypes() */ public function getStrictTypes(): bool { trigger_error(__METHOD__ . '() is deprecated, use hasStrictTypes().', E_USER_DEPRECATED); return $this->strictTypes; } public function __toString(): string { return (new Printer)->printFile($this); } } __halt_compiler();----SIGNATURE:----SvQLow6PeoanNXr6HCKU+CFsuOYn/U713OPc7aKgEya5lHNKAdfZfnEX59XxTEmsewnyZcfwyCN0zPYaRSvi/HrYj5EwS8t5TAJPSHSSaTxjzWBW9T872H4mUY5NqwWbiN0pK9mTYECJI8MaSszIXhbCZq4k5IAvnn0N19kTsqPAu7ybAbMtaNrWNNRZ+A4XbCyiNLqe3yU7+VixNyHqR06Gs3UWMzvHNZDIjqChfA8FRu4F7QVOdFaxr5Tm06/Wh4Jg/qGjjBXPGpfRYqOxs5Mc/vMQvnDs9KC5EK8zITYolrjkvI/pJIEMQ9XGyggNcTIehNLyehLaGxu37aO68O+YqlRogX9o5CAflFhINLuEKQZb6txCfK/kPHkStlgRpnkcDKAR0+U0RlShqGduDUW2qy1EOlOY3w/js/N65DQOZBdnlCv/4mTJU9eYuFzboWpaT7Yz0ZAbyRcT6XBrL5CrbDDUmDhJM0HLAvqq44NAf5a8Rz3uqfKns9wI2ezvcOfa4bKJ9oJVZV44N8oOZtXqf7nOmvY4yz4LfPHN9UGuugfceCNaYuLnpSS6Dyzl0ZVJG8OPfBcUNWpemksolOiWkXOh4+5DsZ0+vn+vhoe3+Z+6PTHgEFutr0eo8OLVEhJl/FwhIMq+V/snzn+c281LOB0VessmgTL7Q+47fIs=----ATTACHMENT:----ODA5MDA1NDkwNjc1MjE5NCAyMjQ5OTk3MTU1MTQ1NTcwIDI4Mzk0Nzc1NjcxMzY2NjM=