Skip to content

Commit 97f8356

Browse files
GrahamCampbellStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent 7682438 commit 97f8356

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

lib/Gitlab/Api/AbstractApi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ abstract class AbstractApi implements ApiInterface
4545
public function __construct(Client $client, StreamFactory $streamFactory = null)
4646
{
4747
$this->client = $client;
48-
$this->streamFactory = $streamFactory === null ? StreamFactoryDiscovery::find() : $streamFactory;
48+
$this->streamFactory = null === $streamFactory ? StreamFactoryDiscovery::find() : $streamFactory;
4949
}
5050

5151
/**
@@ -286,7 +286,7 @@ private function guessContentType($file)
286286
$finfo = new \finfo(FILEINFO_MIME_TYPE);
287287
$type = $finfo->file($file);
288288

289-
return $type !== false ? $type : 'application/octet-stream';
289+
return false !== $type ? $type : 'application/octet-stream';
290290
}
291291

292292
/**

lib/Gitlab/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class Client
103103
*/
104104
public function __construct(Builder $httpClientBuilder = null)
105105
{
106-
$this->httpClientBuilder = $builder = $httpClientBuilder === null ? new Builder() : $httpClientBuilder;
106+
$this->httpClientBuilder = $builder = null === $httpClientBuilder ? new Builder() : $httpClientBuilder;
107107
$this->responseHistory = new History();
108108

109109
$builder->addPlugin(new GitlabExceptionThrower());

lib/Gitlab/HttpClient/Builder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ public function __construct(
8383
RequestFactory $requestFactory = null,
8484
StreamFactory $streamFactory = null
8585
) {
86-
$this->httpClient = $httpClient === null ? HttpClientDiscovery::find() : $httpClient;
87-
$this->requestFactory = $requestFactory === null ? MessageFactoryDiscovery::find() : $requestFactory;
88-
$this->streamFactory = $streamFactory === null ? StreamFactoryDiscovery::find() : $streamFactory;
86+
$this->httpClient = null === $httpClient ? HttpClientDiscovery::find() : $httpClient;
87+
$this->requestFactory = null === $requestFactory ? MessageFactoryDiscovery::find() : $requestFactory;
88+
$this->streamFactory = null === $streamFactory ? StreamFactoryDiscovery::find() : $streamFactory;
8989
}
9090

9191
/**

lib/Gitlab/HttpClient/Plugin/GitlabExceptionThrower.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function doHandleRequest(RequestInterface $request, callable $next, calla
4141
if ($status >= 400 && $status < 600) {
4242
$message = ResponseMediator::getErrorMessage($response);
4343

44-
throw self::createException($status, $message === null ? $response->getReasonPhrase() : $message);
44+
throw self::createException($status, null === $message ? $response->getReasonPhrase() : $message);
4545
}
4646

4747
return $response;

0 commit comments

Comments
 (0)