Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
40.00% |
2 / 5 |
|
40.00% |
2 / 5 |
CRAP | |
0.00% |
0 / 1 |
| phpbb_mock_lang | |
40.00% |
2 / 5 |
|
40.00% |
2 / 5 |
10.40 | |
0.00% |
0 / 1 |
| offsetExists | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| offsetGet | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| offsetSet | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| offsetUnset | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| lang | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * |
| 4 | * This file is part of the phpBB Forum Software package. |
| 5 | * |
| 6 | * @copyright (c) phpBB Limited <https://www.phpbb.com> |
| 7 | * @license GNU General Public License, version 2 (GPL-2.0) |
| 8 | * |
| 9 | * For full copyright and license information, please see |
| 10 | * the docs/CREDITS.txt file. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | /** |
| 15 | * phpbb_mock_lang |
| 16 | * mock a user with some language-keys specified |
| 17 | */ |
| 18 | class phpbb_mock_lang implements ArrayAccess |
| 19 | { |
| 20 | public function offsetExists($offset): bool |
| 21 | { |
| 22 | return true; |
| 23 | } |
| 24 | |
| 25 | public function offsetGet($offset): mixed |
| 26 | { |
| 27 | return $offset; |
| 28 | } |
| 29 | |
| 30 | public function offsetSet($offset, $value): void |
| 31 | { |
| 32 | } |
| 33 | |
| 34 | public function offsetUnset($offset): void |
| 35 | { |
| 36 | } |
| 37 | |
| 38 | public function lang(): string |
| 39 | { |
| 40 | return implode(' ', func_get_args()); |
| 41 | } |
| 42 | } |