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