Remove unused import and redundant scope validation method

This commit is contained in:
netkas 2024-09-18 13:54:17 -04:00
parent 68cfed8a05
commit d8247b0760

View file

@ -22,7 +22,6 @@
namespace ncc\Utilities;
use ncc\Enums\LogLevel;
use ncc\Enums\RegexPatterns;
use ncc\Enums\Scopes;
@ -94,32 +93,6 @@
return false;
}
/**
* Validates the scope
*
* @param string $input
* @param bool $resolve
* @return bool
* @noinspection PhpSwitchCanBeReplacedWithMatchExpressionInspection
*/
public static function scope(string $input, bool $resolve=true): bool
{
if($resolve)
{
$input = Resolver::resolveScope($input);
}
switch($input)
{
case Scopes::SYSTEM->value:
case Scopes::USER->value:
return true;
default:
return false;
}
}
/**
* Validates if the package name is valid
*