1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace DalliSDK\Requests; |
||
6 | |||
7 | use DalliSDK\Models\Auth; |
||
8 | |||
9 | abstract class AbstractRequest |
||
10 | { |
||
11 | /** |
||
12 | * @var Auth|null |
||
13 | */ |
||
14 | private ?Auth $auth = null; |
||
15 | |||
16 | /** |
||
17 | * @param string $token |
||
18 | * |
||
19 | * @return void |
||
20 | */ |
||
21 | 5 | public function setAuth(string $token): void |
|
22 | { |
||
23 | 5 | $this->auth = new Auth($token); |
|
24 | } |
||
25 | |||
26 | /** |
||
27 | * @return Auth|null |
||
28 | */ |
||
29 | 1 | public function getAuth(): ?Auth |
|
30 | { |
||
31 | 1 | return $this->auth; |
|
32 | } |
||
33 | |||
34 | /** |
||
35 | * @return string |
||
36 | * @psalm-suppress UndefinedConstant |
||
37 | */ |
||
38 | 28 | public function getResponseClass(): string |
|
39 | { |
||
40 | 28 | return static::RESPONSE_CLASS; |
|
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
41 | } |
||
42 | } |
||
43 |