/** * @param string $name * @param string $text */ protected function __construct($name, $text) { parent::__construct($name, $text); $text = trim($text); $parts = preg_split('~\\s+~', trim($text), 2); $this->type = Type::fromString($parts[0]); if (count($parts) >= 2) { $this->description = $parts[1] ?: null; } }