diff --git a/src/ncc/Utilities/Validate.php b/src/ncc/Utilities/Validate.php index 1e02c8e..9ab5d12 100644 --- a/src/ncc/Utilities/Validate.php +++ b/src/ncc/Utilities/Validate.php @@ -1,26 +1,26 @@ 126) - { - return false; - } - - return true; - } - - /** - * Determines if a Unix filepath is valid - * - * @param $input - * @return bool - */ - public static function unixFilepath($input): bool - { - if(preg_match(RegexPatterns::UNIX_PATH->value, $input)) - { - return true; - } - - return false; - } - /** * Validates if the constant name is valid * @@ -204,51 +162,6 @@ namespace ncc\Utilities; return true; } - /** - * Validates the execution policy name - * - * @param string $input - * @return bool - */ - public static function executionPolicyName(string $input): bool - { - if(!preg_match(RegexPatterns::EXECUTION_POLICY_NAME->value, $input)) - { - return false; - } - - return true; - } - - /** - * Determines if the given log level is valid or not - * - * @param string $input - * @return bool - */ - public static function checkLogLevel(string|LogLevel $input): bool - { - if($input instanceof LogLevel) - { - return true; - } - - return in_array(strtolower($input), array_map( - fn($case) => $case->value, LogLevel::cases()), true - ); - } - - /** - * Determines if given input exceeds the path length limit - * - * @param string $input - * @return bool - */ - public static function exceedsPathLength(string $input): bool - { - return strlen($input) > 4096; - } - /** * Determines if the input is considered "name friendly" and does not * contain any special characters, spaces or weird prefixes @@ -301,20 +214,4 @@ namespace ncc\Utilities; return true; } - - /*** - * Returns True if the given remote package input is valid - * - * @param string $input - * @return bool - */ - public static function remotePackageInput(string $input): bool - { - if(preg_match(RegexPatterns::REMOTE_PACKAGE->value, $input)) - { - return true; - } - - return false; - } } \ No newline at end of file