Skip to content

Commit 39c78db

Browse files
committed
fix error return type
1 parent fc02263 commit 39c78db

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/Api2pdf.php

+8-4
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@
66

77
class Api2pdf
88
{
9-
/**
10-
* @return Client
11-
*/
9+
private Client $client;
10+
1211
public function __construct(array $config)
1312
{
14-
return new Client($config['api_key']);
13+
$this->client = new Client($config['api_key']);
14+
}
15+
16+
public function client(): Client
17+
{
18+
return $this->client;
1519
}
1620
}

src/helpers.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<?php
22

3-
use Api2Pdf\Api2Pdf as Client;
43
use Sawirricardo\Laravel\Api2pdf\Api2pdf;
54

65
if (! function_exists('api2pdf')) {
7-
function api2pdf(): Client
6+
function api2pdf(): Api2pdf
87
{
98
return app(Api2pdf::class);
109
}

0 commit comments

Comments
 (0)