Total Complexity | 4 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | trait HasClientTrait |
||
12 | { |
||
13 | /** |
||
14 | * @var null|ReCaptcha |
||
15 | */ |
||
16 | protected $client = null; |
||
17 | |||
18 | /** |
||
19 | * @return ReCaptcha|null |
||
20 | */ |
||
21 | public function getClient(): ReCaptcha |
||
22 | { |
||
23 | if ($this->client === null) { |
||
24 | $this->initClient(); |
||
25 | } |
||
26 | return $this->client; |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @param ReCaptcha|null $client |
||
31 | */ |
||
32 | public function setClient(?ReCaptcha $client): void |
||
35 | } |
||
36 | |||
37 | protected function initClient() |
||
41 | } |
||
42 | } |