no need to check variable on private methods

master
Jean-Christian Paul Denis 2023-04-16 12:10:31 +02:00
parent 4e7e126c24
commit da937efdea
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
1 changed files with 3 additions and 8 deletions

View File

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