Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Nov 9, 2023
1 parent 5bd1a95 commit 7b5f060
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of fof/geoip.
*
* Copyright (c) FriendsOfFlarum.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

use Flarum\Database\Migration;

return Migration::addColumns('ip_info', [
Expand Down
12 changes: 11 additions & 1 deletion src/Command/FetchIPInfo.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of fof/geoip.
*
* Copyright (c) FriendsOfFlarum.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace FoF\GeoIP\Command;

use Flarum\User\User;
Expand All @@ -10,5 +19,6 @@ public function __construct(
public string $ip,
public ?User $actor = null,
public bool $refresh = false
) {}
) {
}
}
14 changes: 12 additions & 2 deletions src/Command/FetchIPInfoHandler.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of fof/geoip.
*
* Copyright (c) FriendsOfFlarum.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace FoF\GeoIP\Command;

use FoF\GeoIP\Api\GeoIP;
Expand All @@ -10,8 +19,9 @@ class FetchIPInfoHandler
{
public function __construct(
protected GeoIP $geoip
) {}

) {
}

public function handle(FetchIPInfo $command): IPInfo
{
$ipInfo = IPInfo::query()->firstOrNew(['address' => $command->ip]);
Expand Down

0 comments on commit 7b5f060

Please sign in to comment.