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 Sep 14, 2024
1 parent d2b56ab commit 102f754
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Api/Services/IPApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ protected function getRequestOptions(?string $apiKey, array $ips = null): array
$options['query'] = [
'fields' => $this->requestFields,
];

if ($ips && is_array($ips)) {
// array is key => value, we only want values, then encode to json
$ips = array_values($ips);
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Services/IPApiPro.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected function getRequestOptions(?string $apiKey, array $ips = null): array
{
$options = parent::getRequestOptions($apiKey, $ips);
$options['query']['key'] = $apiKey;

return $options;
}
}
2 changes: 0 additions & 2 deletions src/Command/FetchIPInfoHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
use FoF\GeoIP\Api\GeoIP;
use FoF\GeoIP\Model\IPInfo;
use FoF\GeoIP\Repositories\GeoIPRepository;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Psr\Log\LoggerInterface;
use RuntimeException;

class FetchIPInfoHandler
{
Expand Down
13 changes: 11 additions & 2 deletions src/Listeners/RetrieveIP.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\Listeners;

use Flarum\Post\Event\Saving as PostSaving;
Expand All @@ -19,13 +28,13 @@ class RetrieveIP
* @var GeoIPRepository
*/
protected $geo;

public function __construct(Queue $queue, GeoIPRepository $geo)
{
$this->queue = $queue;
$this->geo = $geo;
}

public function subscribe(Dispatcher $events)
{
$events->listen(PostSaving::class, [$this, 'handlePost']);
Expand Down

0 comments on commit 102f754

Please sign in to comment.