Skip to content

Commit 4158951

Browse files
authored
Linting Scrub (#516)
* Code sniffer auto fixes * Friends of PHP code lint fixer * Whoops, fix composer.json
1 parent 9c2cd96 commit 4158951

File tree

69 files changed

+501
-189
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+501
-189
lines changed

src/Account/Price.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Vonage\Entity\JsonResponseTrait;
1111
use Vonage\Entity\JsonSerializableTrait;
1212
use Vonage\Entity\NoRequestResponseTrait;
13+
1314
use function array_key_exists;
1415
use function ltrim;
1516
use function preg_replace;

src/Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public function __construct(
210210

211211
// Additional utility classes
212212
APIResource::class => APIResource::class,
213-
Client::class => fn() => $this
213+
Client::class => fn () => $this
214214
];
215215

216216
if (class_exists('Vonage\Video\ClientFactory')) {
@@ -231,7 +231,7 @@ public function __construct(
231231
// Disable throwing E_USER_DEPRECATED notices by default, the user can turn it on during development
232232
if (array_key_exists('show_deprecations', $this->options) && ($this->options['show_deprecations'] == true)) {
233233
set_error_handler(
234-
static fn(int $errno, string $errstr, string $errfile = null, int $errline = null, array $errorcontext = null) => true,
234+
static fn (int $errno, string $errstr, string $errfile = null, int $errline = null, array $errorcontext = null) => true,
235235
E_USER_DEPRECATED
236236
);
237237
}

src/Client/APIClient.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace Vonage\Client;

src/Client/APIExceptionHandler.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace Vonage\Client;

src/Client/APIResource.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,13 @@ public function delete(string $id, array $headers = []): ?array
182182
* @throws ClientExceptionInterface
183183
* @throws Exception\Exception
184184
*/
185-
public function get($id, array $query = [], array $headers = [], bool $jsonResponse = true, bool $uriOverride = false)
186-
{
185+
public function get(
186+
$id,
187+
array $query = [],
188+
array $headers = [],
189+
bool $jsonResponse = true,
190+
bool $uriOverride = false
191+
) {
187192
$uri = $this->getBaseUrl() . $this->baseUri . '/' . $id;
188193

189194
// This is a necessary hack if you want to fetch a totally different URL but use Vonage Auth

src/Client/Credentials/Handler/BasicHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ public function __invoke(RequestInterface $request, CredentialsInterface $creden
1717

1818
return $request->withHeader('Authorization', 'Basic ' . $cx);
1919
}
20-
}
20+
}

src/Client/Credentials/Handler/BasicQueryHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ public function __invoke(RequestInterface $request, CredentialsInterface $creden
1616

1717
return $request->withUri($request->getUri()->withQuery(http_build_query($query)));
1818
}
19-
}
19+
}

src/Client/Credentials/Handler/GnpKeypairHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ public function __invoke(RequestInterface $request, CredentialsInterface $creden
1717

1818
return $request->withHeader('Authorization', 'Bearer ' . $token->toString());
1919
}
20-
}
20+
}

src/Client/Credentials/Handler/HandlerInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ interface HandlerInterface
1010
/**
1111
* Add authentication to a request
1212
*/
13-
function __invoke(RequestInterface $request, CredentialsInterface $credentials): RequestInterface;
13+
public function __invoke(RequestInterface $request, CredentialsInterface $credentials): RequestInterface;
1414
}

src/Client/Credentials/Handler/KeypairHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ public function __invoke(RequestInterface $request, CredentialsInterface $creden
1616

1717
return $request->withHeader('Authorization', 'Bearer ' . $token->toString());
1818
}
19-
}
19+
}

0 commit comments

Comments
 (0)