Total Complexity | 4 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class VerificationCodeManager |
||
10 | { |
||
11 | protected $cacheManager; |
||
12 | |||
13 | /** |
||
14 | * VerificationCodeManager constructor. |
||
15 | * |
||
16 | * @param $cacheManager |
||
17 | */ |
||
18 | 2 | public function __construct(Factory $cacheManager) |
|
19 | { |
||
20 | 2 | $this->cacheManager = $cacheManager; |
|
21 | 2 | } |
|
22 | |||
23 | 2 | protected function getPrefixedKey($number) |
|
26 | } |
||
27 | |||
28 | 1 | public function verify($number, $code) |
|
29 | { |
||
30 | 1 | return $code === $this->cacheManager->get($this->getPrefixedKey($number)); |
|
31 | } |
||
32 | |||
33 | 2 | public function issue($number) |
|
40 | } |
||
41 | } |
||
42 |