no need to check variable on private methods

This commit is contained in:
Jean-Christian Paul Denis 2023-04-16 12:10:31 +02:00
parent 4e7e126c24
commit da937efdea
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951

View File

@ -262,8 +262,8 @@ class Uninstaller
private function addAction(string $group, string $cleaner, string $action, string $ns): void private function addAction(string $group, string $cleaner, string $action, string $ns): void
{ {
// invalid group or no current module or no cleaner id or ns // no current module or no cleaner id or ns
if (!self::group($group) || null === $this->module || empty($cleaner) || empty($ns)) { if (null === $this->module || empty($cleaner) || empty($ns)) {
return; return;
} }
// unknow cleaner action // unknow cleaner action
@ -283,7 +283,7 @@ class Uninstaller
private function getActions(string $group, string $id): array private function getActions(string $group, string $id): array
{ {
if (!self::group($group) || !isset($this->actions[$group][$id])) { if (!isset($this->actions[$group][$id])) {
return []; return [];
} }
$res = []; $res = [];
@ -296,9 +296,4 @@ class Uninstaller
return $res; return $res;
} }
private function group(string $group): bool
{
return in_array($group, ['user', 'direct']);
}
} }