public function __construct($name, $text = null) { parent::__construct($name, $text); list($type, $param, ) = explode(' ', $text); $this->type = $type; $this->paramName = ltrim($param, '$'); $this->description = trim(substr($text, strlen($type) + strlen($this->paramName) + 2)); }
public function __construct($name, $text = null) { parent::__construct($name, $text); list($type, ) = explode(' ', $text); if (strpos($type, '|') !== false) { $types = explode('|', $type); } else { $types = array($type); } $this->types = $types; $this->description = trim(substr($text, strlen($type))); }