Total Complexity | 3 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | class EnvAuthProvider implements ProviderInterface, SetContextInterface |
||
18 | { |
||
19 | private string $context; |
||
20 | |||
21 | /** @var array<string, string> */ |
||
22 | private array $envAuth; |
||
23 | |||
24 | /** @param string $context */ |
||
25 | public function setContext($context): void |
||
26 | { |
||
27 | $this->context = $context; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @param array<string, string> $envAuth |
||
32 | * |
||
33 | * @EnvAuth |
||
34 | */ |
||
35 | #[EnvAuth] |
||
36 | public function __construct(array $envAuth) |
||
37 | { |
||
38 | $this->envAuth = $envAuth; |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | public function get(): string |
||
50 | } |
||
51 | } |
||
52 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: