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 4b961b6 commit 4775046
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/Api/Controller/ShowIpInfoController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ class ShowIpInfoController extends AbstractShowController
public $serializer = IPInfoSerializer::class;

public function __construct(protected GeoIP $geoIP)
{}
{
}

/**
* Get the IP information, either from the database or by performing a lookup.
Expand Down
2 changes: 1 addition & 1 deletion src/IPInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Flarum\Database\AbstractModel;

/**
* @property string $address
* @property string $address
* @property string|null $country_code
* @property string|null $zip_code
* @property string|null $isp
Expand Down
6 changes: 4 additions & 2 deletions src/IPInfoSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ class IPInfoSerializer extends AbstractSerializer
protected $type = 'ip_info';

/**
* Undocumented function
* Undocumented function.
*
* @param IPInfo $ip
*
* @return array
*/
protected function getDefaultAttributes($ip): array
{
if (! ($ip instanceof IPInfo)) {
if (!($ip instanceof IPInfo)) {
throw new InvalidArgumentException(
get_class($this).' can only serialize instances of '.IPInfo::class
);
Expand All @@ -45,6 +46,7 @@ protected function getDefaultAttributes($ip): array

/**
* @param IPInfo $model
*
* @return string
*/
public function getId($model)
Expand Down

0 comments on commit 4775046

Please sign in to comment.