Skip to content

Commit cf22aac

Browse files
committed
clean code using object property
1 parent 79e06aa commit cf22aac

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/Middleware/Agent.php

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ protected function isDevice()
119119

120120
$function = 'is' . ucfirst($allow);
121121

122-
if ($this->$function()) {
122+
if ($this->parser->$function()) {
123123
continue;
124124
}
125125

@@ -167,19 +167,4 @@ protected function isProperty()
167167

168168
return false;
169169
}
170-
171-
protected function isMobile(): bool
172-
{
173-
return (new Parser())->isMobile();
174-
}
175-
176-
protected function isTablet(): bool
177-
{
178-
return (new Parser())->isTablet();
179-
}
180-
181-
protected function isDesktop(): bool
182-
{
183-
return (new Parser())->isDesktop();
184-
}
185170
}

0 commit comments

Comments
 (0)