Passed
Pull Request — main (#15)
by
unknown
02:10
created
src/HttpClient/Plugin/ExceptionThrower.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     #[Override]
30 30
     public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
31 31
     {
32
-        return $next($request)->then(static function (ResponseInterface $response): ResponseInterface {
32
+        return $next($request)->then(static function(ResponseInterface $response): ResponseInterface {
33 33
             $status = $response->getStatusCode();
34 34
 
35 35
             if ($status >= 400 && $status < 600) {
Please login to merge, or discard this patch.
src/HttpClient/Plugin/RateLimiter.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,8 @@
 block discarded – undo
33 33
         private LimiterInterface $rateLimiter,
34 34
         private int $tokens = 1,
35 35
         private ?float $maxTime = null
36
-    ) {}
36
+    ) {
37
+}
37 38
 
38 39
     /**
39 40
      * @throws MaxWaitDurationExceededException if $maxTime is set and the process needs to wait longer than its value
Please login to merge, or discard this patch.
src/Client.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
     public function __construct(
59 59
         private readonly Builder $httpClientBuilder = new Builder(),
60 60
         private readonly bool $throttle = false,
61
-        private readonly ?array $throttleOptions = null,
61
+        private readonly ? array $throttleOptions = null,
62 62
     ) {
63 63
         $this->responseHistory = new History();
64 64
 
Please login to merge, or discard this patch.
src/Api/IP.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      *
27 27
      * @throws Exception
28 28
      */
29
-    public function sendRequest(array|string $ip, string $format = 'json'): string
29
+    public function sendRequest(array | string $ip, string $format = 'json'): string
30 30
     {
31 31
         $response = $this->get($ip, $format);
32 32
 
Please login to merge, or discard this patch.
src/Api/AbstractApi.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      *
39 39
      * @throws Exception
40 40
      */
41
-    protected function get(array|string $query, string $format = 'json'): ResponseInterface
41
+    protected function get(array | string $query, string $format = 'json'): ResponseInterface
42 42
     {
43 43
         return $this->client->getHttpClient()->get($this->prepareUri($query, $format));
44 44
     }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      *
49 49
      * @throws InvalidArgumentException If an invalid format, invalid IP address, or too many IP's are provided.
50 50
      */
51
-    private function prepareUri(array|string $query, string $format): string
51
+    private function prepareUri(array | string $query, string $format): string
52 52
     {
53 53
         if (\is_array($query)) {
54 54
             $query = implode(',', $query);
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      *
69 69
      * @throws InvalidArgumentException If an invalid IP address or too many IP's are provided.
70 70
      */
71
-    private function validateIpAddresses(array|string $ip): void
71
+    private function validateIpAddresses(array | string $ip): void
72 72
     {
73 73
         if (!\is_array($ip)) {
74 74
             $ip = str_contains($ip, ',') ? explode(',', $ip) : [$ip];
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,9 @@
 block discarded – undo
30 30
     /**
31 31
      * Create a new API instance.
32 32
      */
33
-    public function __construct(private readonly Client $client) {}
33
+    public function __construct(private readonly Client $client)
34
+    {
35
+}
34 36
 
35 37
     /**
36 38
      * @param array<string>|string $query
Please login to merge, or discard this patch.