name = $property; $this->parse(); } /** * Parse the fullname. * * @return void */ private function parse(): void { if (str_starts_with($this->name, 'tablet')) { $this->name = lcfirst(substr($this->name, 6)); $this->device = 'tablet'; } elseif (str_starts_with($this->name, 'mobile')) { $this->name = lcfirst(substr($this->name, 6)); $this->device = 'mobile'; } if (str_ends_with($this->name, 'Hover')) { $this->name = substr($this->name, 0, strlen($this->name) - 5); $this->hover = true; } } }