Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 7 |
|
0.00% |
0 / 5 |
CRAP | |
0.00% |
0 / 1 |
CaptchaHashStore | |
0.00% |
0 / 7 |
|
0.00% |
0 / 5 |
42 | |
0.00% |
0 / 1 |
store | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
retrieve | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
clear | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
cookiesNeeded | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
clearAll | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Extension\ConfirmEdit\Store; |
4 | |
5 | class CaptchaHashStore extends CaptchaStore { |
6 | protected $data = []; |
7 | |
8 | /** |
9 | * @inheritDoc |
10 | */ |
11 | public function store( $index, $info ) { |
12 | $this->data[$index] = $info; |
13 | } |
14 | |
15 | /** |
16 | * @inheritDoc |
17 | */ |
18 | public function retrieve( $index ) { |
19 | if ( array_key_exists( $index, $this->data ) ) { |
20 | return $this->data[$index]; |
21 | } |
22 | return false; |
23 | } |
24 | |
25 | /** |
26 | * @inheritDoc |
27 | */ |
28 | public function clear( $index ) { |
29 | unset( $this->data[$index] ); |
30 | } |
31 | |
32 | public function cookiesNeeded() { |
33 | return false; |
34 | } |
35 | |
36 | public function clearAll() { |
37 | $this->data = []; |
38 | } |
39 | } |