Skip to content

Commit

Permalink
fix: use explicit nullable type for AmplitudeConfig (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruudk authored Jan 14, 2025
1 parent 63703e1 commit c5a91cd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3']
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion src/Amplitude/Amplitude.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Amplitude
private LoggerInterface $logger;
private AmplitudeConfig $config;

public function __construct(string $apiKey, AmplitudeConfig $config = null)
public function __construct(string $apiKey, ?AmplitudeConfig $config = null)
{
$this->apiKey = $apiKey;
$this->config = $config ?? AmplitudeConfig::builder()->build();
Expand Down
2 changes: 1 addition & 1 deletion tests/Amplitude/MockAmplitude.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class MockAmplitude extends Amplitude
{
public function __construct(string $apiKey, AmplitudeConfig $config = null)
public function __construct(string $apiKey, ?AmplitudeConfig $config = null)
{
parent::__construct($apiKey, $config);
}
Expand Down

0 comments on commit c5a91cd

Please sign in to comment.