diff --git a/CHANGELOG.md b/CHANGELOG.md index f77acf1..188e1a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.1.0] - 2023-10-11 +## [1.1.0] - 2023-10-12 Updated loglib to work with ncc 2.+. diff --git a/src/LogLib/Classes/Validate.php b/src/LogLib/Classes/Validate.php index 07f2490..d3141d5 100644 --- a/src/LogLib/Classes/Validate.php +++ b/src/LogLib/Classes/Validate.php @@ -9,10 +9,10 @@ /** * Checks if the given level is a valid level type. * - * @param string $level The level to check. + * @param int $level The level to check. * @return bool Returns true if the level is valid */ - public static function LevelType(string $level): bool + public static function LevelType(int $level): bool { return in_array($level, LevelType::ALL); } @@ -20,19 +20,17 @@ /** * Checks if the given input level is valid for the current level. * - * @param string $input The input level to check. - * @param string $current_level The current level to compare against. + * @param int $input The input level to check. + * @param int $current_level The current level to compare against. * @return bool Returns true if the input level is valid for the current level, false otherwise. */ - public static function checkLevelType(string $input, string $current_level): bool + public static function checkLevelType(int $input, int $current_level): bool { - $input = strtolower($input); if(!self::LevelType($input)) { return false; } - $current_level = strtolower($current_level); if(!self::LevelType($current_level)) { return false;