Skip to content

Commit d62eac6

Browse files
refactor: add return for methods
1 parent a3157a8 commit d62eac6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/Api/FingerprintApi.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Fingerprint\ServerAPI\Configuration;
1111
use GuzzleHttp\Psr7\Request;
1212
use GuzzleHttp\RequestOptions;
13+
use RuntimeException;
1314

1415
class FingerprintApi
1516
{
@@ -37,25 +38,25 @@ public function __construct(
3738
$this->config = $config ?: new Configuration();
3839
}
3940

40-
protected function getSDKVersion()
41+
protected function getSDKVersion(): string
4142
{
4243
$string = file_get_contents(dirname(__FILE__) . "/../../composer.json");
4344
$jsonData = json_decode($string, true);
4445

4546
return $jsonData['version'];
4647
}
4748

48-
protected function getEventURL()
49+
protected function getEventURL(): string
4950
{
5051
return $this->config->getHost() . "/events/{request_id}";
5152
}
5253

53-
protected function getVisitsURL()
54+
protected function getVisitsURL(): string
5455
{
5556
return $this->config->getHost() . "/visitors/{visitor_id}";
5657
}
5758

58-
protected function getClientOptions()
59+
protected function getClientOptions(): array
5960
{
6061
$options = [
6162
'headers' => [
@@ -81,7 +82,7 @@ protected function getClientOptions()
8182
if ($this->config->getDebug()) {
8283
$options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a');
8384
if (!$options[RequestOptions::DEBUG]) {
84-
throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile());
85+
throw new RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile());
8586
}
8687
}
8788

0 commit comments

Comments
 (0)