Skip to content

Commit c5a91cd

Browse files
authored
fix: use explicit nullable type for AmplitudeConfig (#32)
1 parent 63703e1 commit c5a91cd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3']
14+
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
1515
os: [ubuntu-latest]
1616
runs-on: ${{ matrix.os }}
1717

src/Amplitude/Amplitude.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Amplitude
2626
private LoggerInterface $logger;
2727
private AmplitudeConfig $config;
2828

29-
public function __construct(string $apiKey, AmplitudeConfig $config = null)
29+
public function __construct(string $apiKey, ?AmplitudeConfig $config = null)
3030
{
3131
$this->apiKey = $apiKey;
3232
$this->config = $config ?? AmplitudeConfig::builder()->build();

tests/Amplitude/MockAmplitude.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class MockAmplitude extends Amplitude
1111
{
12-
public function __construct(string $apiKey, AmplitudeConfig $config = null)
12+
public function __construct(string $apiKey, ?AmplitudeConfig $config = null)
1313
{
1414
parent::__construct($apiKey, $config);
1515
}

0 commit comments

Comments
 (0)