Skip to content

Commit

Permalink
styling fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaselia committed Mar 29, 2024
1 parent 2e7a37e commit d73d9b5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/Agent.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ public function version(string $propertyName, string $type = self::VERSION_TYPE_

// Check if the property exists in the properties array.
if (true === isset($properties[$propertyName])) {

// Prepare the pattern to be matched.
// Make sure we always deal with an array (string is converted).
$properties[$propertyName] = (array) $properties[$propertyName];
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Middleware/Analytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function handle(Request $request, Closure $next)

PageView::create(array_merge([
'session' => $this->getSessionProvider()->get($request),
'uri' => $uri,
'uri' => $uri,
'source' => $request->headers->get('referer'),
'country' => $agent->languages()[0] ?? 'en-en',
'browser' => $agent->browser() ?? null,
Expand Down
8 changes: 4 additions & 4 deletions tests/Unit/AgentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function operating_systems()
$this->assertEquals($platform, $agent->platform(), $ua);
$this->assertTrue($agent->is($platform), $platform);

if (!strpos($platform, ' ')) {
if (! strpos($platform, ' ')) {
$method = "is{$platform}";
$this->assertTrue($agent->{$method}(), $ua);
}
Expand All @@ -149,7 +149,7 @@ public function browsers()
$this->assertEquals($browser, $agent->browser(), $ua);
$this->assertTrue($agent->is($browser), $browser);

if (!strpos($browser, ' ')) {
if (! strpos($browser, ' ')) {
$method = "is{$browser}";
$this->assertTrue($agent->{$method}(), $ua);
}
Expand Down Expand Up @@ -198,7 +198,7 @@ public function mobile_devices()
$this->assertTrue($agent->isMobile(), $ua);
$this->assertFalse($agent->isDesktop(), $ua);

if (!strpos($device, ' ')) {
if (! strpos($device, ' ')) {
$method = "is{$device}";
$this->assertTrue($agent->{$method}(), $ua, $method);
}
Expand All @@ -216,7 +216,7 @@ public function desktop_devices()
$this->assertFalse($agent->isMobile(), $ua);
$this->assertTrue($agent->isDesktop(), $ua);

if (!strpos($device, ' ')) {
if (! strpos($device, ' ')) {
$method = "is{$device}";
$this->assertTrue($agent->{$method}(), $ua);
}
Expand Down

0 comments on commit d73d9b5

Please sign in to comment.