Skip to content

Commit 9bd8e00

Browse files
committed
Fix implicit nullable types to avoid PHP 8.4 warnings
1 parent 71fec50 commit 9bd8e00

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/Github/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class Client
123123
* @param string|null $apiVersion
124124
* @param string|null $enterpriseUrl
125125
*/
126-
public function __construct(Builder $httpClientBuilder = null, $apiVersion = null, $enterpriseUrl = null)
126+
public function __construct(?Builder $httpClientBuilder = null, $apiVersion = null, $enterpriseUrl = null)
127127
{
128128
$this->responseHistory = new History();
129129
$this->httpClientBuilder = $builder = $httpClientBuilder ?? new Builder();

lib/Github/HttpClient/Builder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ class Builder
7878
* @param StreamFactoryInterface|null $streamFactory
7979
*/
8080
public function __construct(
81-
ClientInterface $httpClient = null,
82-
RequestFactoryInterface $requestFactory = null,
83-
StreamFactoryInterface $streamFactory = null
81+
?ClientInterface $httpClient = null,
82+
?RequestFactoryInterface $requestFactory = null,
83+
?StreamFactoryInterface $streamFactory = null
8484
) {
8585
$this->httpClient = $httpClient ?? Psr18ClientDiscovery::find();
8686
$this->requestFactory = $requestFactory ?? Psr17FactoryDiscovery::findRequestFactory();

lib/Github/ResultPager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class ResultPager implements ResultPagerInterface
5959
*
6060
* @return void
6161
*/
62-
public function __construct(Client $client, int $perPage = null)
62+
public function __construct(?Client $client, ?int $perPage = null)
6363
{
6464
if (null !== $perPage && ($perPage < 1 || $perPage > 100)) {
6565
throw new ValueError(sprintf('%s::__construct(): Argument #2 ($perPage) must be between 1 and 100, or null', self::class));

0 commit comments

Comments
 (0)