mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 00:39:45 +00:00
lang: populate missing return type information
This commit is contained in:
parent
205e47c0c4
commit
0db7e57a15
@ -105,6 +105,12 @@ class BaseLang{
|
||||
return $this->langName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
* @param string[] $d reference parameter
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected static function loadLang(string $path, array &$d){
|
||||
if(file_exists($path)){
|
||||
$d = array_map('\stripcslashes', parse_ini_file($path, false, INI_SCANNER_RAW));
|
||||
@ -132,6 +138,11 @@ class BaseLang{
|
||||
return $baseText;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param TextContainer $c
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function translate(TextContainer $c){
|
||||
if($c instanceof TranslationContainer){
|
||||
$baseText = $this->internalGet($c->getText());
|
||||
|
@ -37,6 +37,8 @@ class TextContainer{
|
||||
|
||||
/**
|
||||
* @param string $text
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setText(string $text){
|
||||
$this->text = $text;
|
||||
|
@ -59,6 +59,8 @@ class TranslationContainer extends TextContainer{
|
||||
/**
|
||||
* @param int $i
|
||||
* @param string $str
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setParameter(int $i, string $str){
|
||||
if($i < 0 or $i > count($this->params)){ //Intended, allow to set the last
|
||||
@ -70,6 +72,8 @@ class TranslationContainer extends TextContainer{
|
||||
|
||||
/**
|
||||
* @param string[] $params
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setParameters(array $params){
|
||||
$i = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user