Skip to content

Commit 9664776

Browse files
Merge pull request #42 from thomasfaure/php84-nullables
comptabilité php 8.4
2 parents ef8a34a + 85e74b8 commit 9664776

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/CrispClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class CrispClient
8686
*/
8787
public $pluginSubscriptions;
8888

89-
public function __construct(HttpClient $client = null, RequestFactoryInterface $requestFactory = null, StreamFactoryInterface $streamFactory = null)
89+
public function __construct(?HttpClient $client = null, ?RequestFactoryInterface $requestFactory = null, ?StreamFactoryInterface $streamFactory = null)
9090
{
9191
$this->client = $client ?: Psr18ClientDiscovery::find();
9292
$this->requestFactory = $requestFactory ?: Psr17FactoryDiscovery::findRequestFactory();

src/CrispException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ public function __construct($statusCode, $responseData)
2929
// Response error?
3030
else if ($statusCode >= 400) {
3131
$reasonMessage = isset($responseData["reason"]) ? $responseData["reason"] : "http_error";
32-
$dataMessage = (isset($responseData["data"]) && isset($responseData["data"]["message"])) ? $responseData["data"]["message"] : NULL;
32+
$dataMessage = (isset($responseData["data"]) && isset($responseData["data"]["message"])) ? $responseData["data"]["message"] : null;
3333

3434
$this->error = [
3535
"reason" => "error",
3636
"message" => $reasonMessage,
3737
"code" => $statusCode,
3838
"data" => [
3939
"namespace" => "response",
40-
"message" => "Got response error: " . ($dataMessage !== NULL ? $dataMessage : $reasonMessage)
40+
"message" => "Got response error: " . ($dataMessage !== null ? $dataMessage : $reasonMessage)
4141
]
4242
];
4343
}

src/Resources/Resource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected function prepareQuery($query)
2525
return (
2626
is_array($query) && count($query) > 0
2727
)
28-
? "?".http_build_query($query, null, "&", PHP_QUERY_RFC3986)
28+
? "?" . http_build_query($query, "", "&", PHP_QUERY_RFC3986)
2929
: "";
3030
}
3131

0 commit comments

Comments
 (0)