This commit is contained in:
Netkas 2023-10-12 17:16:02 -04:00
parent 3e9606c184
commit 7f2332e228
No known key found for this signature in database
GPG key ID: 5DAF58535614062B
2 changed files with 6 additions and 8 deletions

View file

@ -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.+.

View file

@ -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;