Skip to content

Commit

Permalink
todos
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaselia committed Mar 29, 2024
1 parent cbd0b79 commit 9255169
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions src/Agent.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,16 @@ public function languages(string $acceptLanguage = null): array

protected function findDetectionRulesAgainstUA(array $rules, $userAgent = null)
{
// TODO: is this addition right?
// TODO: added this user agent setting, wasn't there before though?
if (! $userAgent) {
$userAgent = $this->getUserAgent();
}

// Loop given rules
foreach ($rules as $key => $regex) {
if (empty($regex)) {
continue;
}

// Check match
if ($this->match($regex, $userAgent)) {
return $key ?: reset($this->matchesArray);
}
Expand Down
2 changes: 0 additions & 2 deletions tests/Unit/AgentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ public function languages_sorted()
#[Test]
public function operating_systems()
{
$this->markTestSkipped('This test is not yet fixed.');

$agent = new Agent();

foreach ($this->operatingSystems as $ua => $platform) {
Expand Down

0 comments on commit 9255169

Please sign in to comment.