Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaselia committed Mar 29, 2024
1 parent d73d9b5 commit dadd2c9
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/Agent.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ public function device($userAgent = null)
static::getDesktopDevices(),
static::getPhoneDevices(),
static::getTabletDevices(),
static::getUtilities()
// TODO: this was removed, is there an alternative? what was it for?
// static::getUtilities()
);

return $this->findDetectionRulesAgainstUA($rules, $userAgent);
Expand Down Expand Up @@ -316,17 +317,17 @@ protected static function mergeRules(...$all)
return $merged;
}

public function __call(string $name, array $arguments)
{
// Make sure the name starts with 'is', otherwise
if (strpos($name, 'is') !== 0) {
throw new BadMethodCallException("No such method exists: $name");
}
// public function __call(string $name, array $arguments)
// {
// // Make sure the name starts with 'is', otherwise
// if (strpos($name, 'is') !== 0) {
// throw new BadMethodCallException("No such method exists: $name");
// }

// $this->setDetectionType(self::DETECTION_TYPE_EXTENDED);
// // $this->setDetectionType(self::DETECTION_TYPE_EXTENDED);

$key = substr($name, 2);
// $key = substr($name, 2);

return $this->matchUAAgainstKey($key);
}
// return $this->matchUAAgainstKey($key);
// }
}

0 comments on commit dadd2c9

Please sign in to comment.