Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 3
CRAP
0.00% covered (danger)
0.00%
0 / 1
HashMessageIndex
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 3
12
0.00% covered (danger)
0.00%
0 / 1
 retrieve
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 get
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 store
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2declare( strict_types = 1 );
3
4namespace MediaWiki\Extension\Translate\MessageLoading;
5
6/** Storage on hash. For testing. */
7class HashMessageIndex extends MessageIndexStore {
8    private array $index = [];
9
10    public function retrieve( bool $readLatest = false ): array {
11        return $this->index;
12    }
13
14    /** @inheritDoc */
15    public function get( string $key ) {
16        return $this->index[$key] ?? null;
17    }
18
19    /** @inheritDoc */
20    public function store( array $array, array $diff ): void {
21        $this->index = $array;
22    }
23}