mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-17 01:42:19 +00:00
Various code cleanup.
This commit is contained in:
@@ -25,6 +25,7 @@ namespace FireflyIII\Support;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use DB;
|
||||
use Exception;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\Transaction;
|
||||
@@ -667,4 +668,19 @@ class Steam
|
||||
|
||||
return $amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $ipAddress
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function getHostName(string $ipAddress): string
|
||||
{
|
||||
try {
|
||||
$hostName = gethostbyaddr($ipAddress);
|
||||
} catch (Exception $e) {
|
||||
throw new FireflyException($e->getMessage(), 0, $e);
|
||||
}
|
||||
return $hostName;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user