Skip to content

Commit

Permalink
Init client if not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
ssitdikov committed Jan 2, 2018
1 parent f35acb5 commit f4c88c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Client/TelegraphClient.php
Expand Up @@ -23,8 +23,11 @@ class TelegraphClient extends AbstractClient

private $client;

public function __construct(Client $client)
public function __construct(Client $client = null)
{
if (null === $client) {
$client = new Client(['base_uri' => 'https://api.telegra.ph/']);
}
$this->client = $client;
}

Expand Down

0 comments on commit f4c88c5

Please sign in to comment.