cosmetic (type hint)
This commit is contained in:
parent
a9fe007b0f
commit
783514eb44
4 changed files with 8 additions and 8 deletions
|
@ -57,7 +57,7 @@ class My
|
|||
/**
|
||||
* List of possible home tab of the plugin
|
||||
*/
|
||||
public static function startPageCombo()
|
||||
public static function startPageCombo(): array
|
||||
{
|
||||
return [
|
||||
__('Plugins') => 'plugin',
|
||||
|
|
|
@ -44,7 +44,7 @@ class TranslaterLang
|
|||
* @param string $key The lang property key
|
||||
* @return mixed The lang property value or null
|
||||
*/
|
||||
public function get(string $key)
|
||||
public function get(string $key): mixed
|
||||
{
|
||||
return array_key_exists($key, $this->prop) ? $this->prop[$key] : null;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ class TranslaterLang
|
|||
/**
|
||||
* Magic get
|
||||
*/
|
||||
public function __get($key)
|
||||
public function __get(string $key): mixed
|
||||
{
|
||||
return $this->get($key);
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ class TranslaterModule
|
|||
* @param string $key The module property key
|
||||
* @return mixed The module property value or null
|
||||
*/
|
||||
public function get(string $key)
|
||||
public function get(string $key): mixed
|
||||
{
|
||||
return array_key_exists($key, $this->prop) ? $this->prop[$key] : null;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ class TranslaterModule
|
|||
/**
|
||||
* Magic get
|
||||
*/
|
||||
public function __get($key)
|
||||
public function __get(string $key): mixed
|
||||
{
|
||||
return $this->get($key);
|
||||
}
|
||||
|
@ -73,9 +73,9 @@ class TranslaterModule
|
|||
* Find backup folder of a module
|
||||
*
|
||||
* @param boolean $throw Silently failed
|
||||
* @return mixed The backup folder directory or false
|
||||
* @return string|false The backup folder directory or false
|
||||
*/
|
||||
public function getBackupRoot(bool $throw = false)
|
||||
public function getBackupRoot(bool $throw = false): string|false
|
||||
{
|
||||
$dir = false;
|
||||
switch ($this->translater->backup_folder) {
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace Dotclear\Plugin\translater;
|
|||
|
||||
class Uninstall
|
||||
{
|
||||
protected static $init = false;
|
||||
protected static bool $init = false;
|
||||
|
||||
public static function init(): bool
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue