| Total Complexity | 6 |
| Total Lines | 61 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | class DummyLang |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * Intercepts loading of xml file. |
||
| 24 | * |
||
| 25 | * @return null |
||
| 26 | */ |
||
| 27 | public function loadLang() |
||
| 28 | { |
||
| 29 | return null; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Tests if given $key exists in lang, always return true |
||
| 34 | * |
||
| 35 | * @return bool |
||
| 36 | */ |
||
| 37 | public function has() |
||
| 38 | { |
||
| 39 | return true; |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Returns the specified $key. |
||
| 44 | * |
||
| 45 | * @param string $key Name of the variable |
||
| 46 | * |
||
| 47 | * @return string|null Value of the specified $key |
||
| 48 | */ |
||
| 49 | public function __get($key) |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Returns the specified $key. |
||
| 56 | * |
||
| 57 | * @param string|array $key Name of the variable |
||
| 58 | * |
||
| 59 | * @return string|null Value of the specified $key |
||
| 60 | */ |
||
| 61 | public function get($key) |
||
| 62 | { |
||
| 63 | if (is_array($key)) |
||
| 64 | { |
||
| 65 | $l_key = array_shift($key); |
||
| 66 | |||
| 67 | return $l_key . ' ' . implode(' ', $key); |
||
| 68 | } |
||
| 69 | |||
| 70 | return $key; |
||
| 71 | } |
||
| 72 | |||
| 73 | /** |
||
| 74 | * Returns the whole lang as an array. |
||
| 75 | * |
||
| 76 | * @return array Whole lang |
||
| 77 | */ |
||
| 78 | public function getAll() |
||
| 81 | } |
||
| 82 | } |
||
| 83 |