Remove unused import and redundant scope validation method
This commit is contained in:
parent
68cfed8a05
commit
d8247b0760
1 changed files with 0 additions and 27 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue