harmonize My class

This commit is contained in:
Jean-Christian Paul Denis 2023-05-08 10:29:26 +02:00
parent 22f9028b71
commit 4994f376ca
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951

View File

@ -17,24 +17,18 @@ namespace Dotclear\Plugin\dcLog;
use dcCore; use dcCore;
/** /**
* Module definition shortcut. * This module definition.
*/ */
class My class My
{ {
/** /** @var string Admin list ID */
* @var string PHP min version public const BACKEND_LIST_ID = 'dcloglist';
*/
/** @var string This module required php version */
public const PHP_MIN = '8.1'; public const PHP_MIN = '8.1';
/**
* @var string Admin list ID
*/
public const BACKEND_LIST_ID = 'dcloglist';
/** /**
* This module id. * This module id.
*
* @return string The module id
*/ */
public static function id(): string public static function id(): string
{ {
@ -43,20 +37,24 @@ class My
/** /**
* This module name. * This module name.
*
* @return string The module translated name
*/ */
public static function name(): string public static function name(): string
{ {
$name = dcCore::app()->plugins->moduleInfo(self::id(), 'name'); $name = dcCore::app()->plugins->moduleInfo(self::id(), 'name');
return __(is_string($name) ? $name : 'Undefined'); return __(is_string($name) ? $name : self::id());
} }
/** /**
* Check php version. * This module path.
* */
* @return bool True on supported PHP version public static function path(): string
{
return dirname(__DIR__);
}
/**
* Check this module PHP version compliant.
*/ */
public static function phpCompliant(): bool public static function phpCompliant(): bool
{ {