no need to check variable on private methods
This commit is contained in:
parent
4e7e126c24
commit
da937efdea
@ -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']);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user