| Total Complexity | 8 |
| Total Lines | 57 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class i18n |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var i18n|null |
||
| 12 | */ |
||
| 13 | private static ?i18n $instance = null; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @return i18n |
||
| 17 | */ |
||
| 18 | public static function getInstance () : i18n |
||
| 19 | { |
||
| 20 | if ( is_null( static::$instance ) ) { |
||
|
|
|||
| 21 | static::$instance = new static; |
||
| 22 | } |
||
| 23 | |||
| 24 | return static::$instance; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @return string|null |
||
| 29 | */ |
||
| 30 | private function getLanguageFromEnvFile () : ?string |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @param string $className |
||
| 40 | * @param string $entry |
||
| 41 | * @param string|null $language |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | public function getText ( string $className, string $entry, string $language = null ) : string |
||
| 65 | } |
||
| 66 | } |
||
| 67 |