Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Hafiq committed Apr 2, 2024
1 parent 8742bc9 commit e7bf948
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/MalaysiaHoliday.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use afiqiqmal\MalaysiaHoliday\exception\RegionException;
use Symfony\Component\BrowserKit\HttpBrowser as Client;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use GuzzleHttp\Client as GuzzleClient;
use function GuzzleHttp\Psr7\str;

Expand Down Expand Up @@ -58,14 +59,14 @@ class MalaysiaHoliday
private $month;
private $groupByMonth = false;

public function __construct()
public function __construct($client = null)
{
$this->client = new Client();
$this->client = new Client($client);
}

public static function make()
public static function make(HttpClientInterface $client = null): MalaysiaHoliday
{
return new self;
return new self($client);
}

public function fromAllState($year = null)
Expand Down

0 comments on commit e7bf948

Please sign in to comment.