Skip to content

Commit 4858a80

Browse files
olsgreenStyleCIBot
andauthored
Apply fixes from StyleCI (#25)
Co-authored-by: StyleCI Bot <[email protected]>
1 parent c1aeacb commit 4858a80

9 files changed

+10
-10
lines changed

src/AbstractClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ abstract class AbstractClient
2121
* @param array $options
2222
* @param ClientInterface|null $http
2323
*/
24-
public function __construct(array $options = [], ClientInterface $http = null)
24+
public function __construct(array $options = [], ?ClientInterface $http = null)
2525
{
2626
$this->http = $http ?? new GuzzleClient();
2727

src/Api/Builders/LookupRequestBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class LookupRequestBuilder extends AbstractBuilder implements BuilderInterface
1616
protected $registration;
1717

1818
/**
19-
* VIN
19+
* VIN.
2020
*
2121
* @var string
2222
*/

src/Api/Exceptions/BadRequestException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class BadRequestException extends ClientException
1010
{
1111
protected array $warnings = [];
1212

13-
public function __construct(string $message, Request $request, Response $response = null, \Exception $previous = null)
13+
public function __construct(string $message, Request $request, ?Response $response = null, ?\Exception $previous = null)
1414
{
1515
if ($response) {
1616
$body = json_decode($response->getBody(), true);

src/Api/Exceptions/DuplicateStockException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class DuplicateStockException extends ClientException
2121
* @param Response|null $response
2222
* @param \Exception|null $previous
2323
*/
24-
public function __construct(string $message, Request $request, Response $response = null, \Exception $previous = null)
24+
public function __construct(string $message, Request $request, ?Response $response = null, ?\Exception $previous = null)
2525
{
2626
if ($response) {
2727
$this->duplicateStockId = $this->parseStockIdFromBody(

src/Api/Taxonomy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function features(string $advertiserId, string $derivativeId, string $eff
126126
*
127127
* @return array
128128
*/
129-
public function prices(string $advertiserId, string $derivativeId, string $effectiveDate = null)
129+
public function prices(string $advertiserId, string $derivativeId, ?string $effectiveDate = null)
130130
{
131131
$options = ['derivativeId' => $derivativeId, 'advertiserId' => $advertiserId];
132132

src/Http/AccessToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function getExpiresAt(): DateTime
4747
public function toArray(): array
4848
{
4949
return [
50-
'access_token' => $this->access_token,
50+
'access_token' => $this->access_token,
5151
'expires_at' => $this->getExpiresAt()
5252
->format(DateTime::ATOM),
5353
/**

src/Http/Exceptions/HttpException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class HttpException extends \Exception
2020
public function __construct(
2121
string $message,
2222
RequestInterface $request,
23-
ResponseInterface $response = null,
24-
\Exception $previous = null
23+
?ResponseInterface $response = null,
24+
?\Exception $previous = null
2525
) {
2626
// Set the code of the exception if the response is set and not future.
2727
$code = $response ? $response->getStatusCode() : 0;

src/Http/GuzzleClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class GuzzleClient extends AbstractClient implements ClientInterface
3636
*
3737
* @param GuzzleClientInterface|null $guzzle
3838
*/
39-
public function __construct(GuzzleClientInterface $guzzle = null)
39+
public function __construct(?GuzzleClientInterface $guzzle = null)
4040
{
4141
if (!$guzzle) {
4242
$guzzle = new Client();

src/Http/SimpleMultipartBody.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class SimpleMultipartBody
2626
*
2727
* @return SimpleMultipartBody
2828
*/
29-
public function add(string $name, $contents, string $filename = null, array $headers = []): SimpleMultipartBody
29+
public function add(string $name, $contents, ?string $filename = null, array $headers = []): SimpleMultipartBody
3030
{
3131
$element = [
3232
'name' => $name,

0 commit comments

Comments
 (0)