harmonize My class
This commit is contained in:
parent
95ac7c2e1b
commit
78b483775e
@ -106,7 +106,7 @@ class CleanersStack implements Countable, Iterator
|
|||||||
if (!isset($this->stack[$id])) {
|
if (!isset($this->stack[$id])) {
|
||||||
throw new Exception(sprintf(__('Unknown cleaner "%s"'), $id));
|
throw new Exception(sprintf(__('Unknown cleaner "%s"'), $id));
|
||||||
}
|
}
|
||||||
if (in_array($ns, [My::id(), My::root()])) {
|
if (in_array($ns, [My::id(), My::path()])) {
|
||||||
throw new Exception(__("Unsintaller can't remove itself"));
|
throw new Exception(__("Unsintaller can't remove itself"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
14
src/My.php
14
src/My.php
@ -17,15 +17,15 @@ namespace Dotclear\Plugin\Uninstaller;
|
|||||||
use dcCore;
|
use dcCore;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plugin definitions
|
* This module definitions.
|
||||||
*/
|
*/
|
||||||
class My
|
class My
|
||||||
{
|
{
|
||||||
/** @var string Required php version */
|
/** @var string This module required php version */
|
||||||
public const PHP_MIN = '8.1';
|
public const PHP_MIN = '8.1';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This module id
|
* This module id.
|
||||||
*/
|
*/
|
||||||
public static function id(): string
|
public static function id(): string
|
||||||
{
|
{
|
||||||
@ -33,7 +33,7 @@ class My
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This module name
|
* This module name.
|
||||||
*/
|
*/
|
||||||
public static function name(): string
|
public static function name(): string
|
||||||
{
|
{
|
||||||
@ -43,15 +43,15 @@ class My
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This plugin root
|
* This module path.
|
||||||
*/
|
*/
|
||||||
public static function root(): string
|
public static function path(): string
|
||||||
{
|
{
|
||||||
return dirname(__DIR__);
|
return dirname(__DIR__);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check php version
|
* Check this module PHP version compliant.
|
||||||
*/
|
*/
|
||||||
public static function phpCompliant(): bool
|
public static function phpCompliant(): bool
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user