readOnly && !$this->getType()) { throw new Nette\InvalidStateException("Property \${$this->getName()}: Read-only properties are only supported on typed property."); } } public function __clone(): void { $this->hooks = array_map(fn($item) => $item ? clone $item : $item, $this->hooks); } }