matchUserAgent($regex); return null !== $match; } /** * Parses the current UA and checks whether it contains ShellTv information * * @see shell_tv.yml for list of detected televisions * * @return array|null */ public function parse(): ?array { // only parse user agents containing fragments: {brand} shell if (false === $this->isShellTv()) { return null; } parent::parse(); // always set device type to tv, even if no model/brand could be found $this->deviceType = self::DEVICE_TYPE_TV; return $this->getResult(); } }