diff --git a/src/Config.php b/src/Config.php index a10fe0a..132af99 100644 --- a/src/Config.php +++ b/src/Config.php @@ -58,7 +58,7 @@ class Config implements ConfigInterface } // Check what type has this value - if (TypeHelper::checkIfTypeMismatch($name, \gettype($value), self::ALLOWED[$name])) { + if (TypeHelper::checkIfTypeMismatch(\gettype($value), self::ALLOWED[$name])) { throw new ConfigException("Parameter '$name' has wrong type '" . \gettype($value) . "' but should be '" . self::ALLOWED[$name] . "'"); } diff --git a/src/Helpers/TypeHelper.php b/src/Helpers/TypeHelper.php index 2df76ec..f074cda 100644 --- a/src/Helpers/TypeHelper.php +++ b/src/Helpers/TypeHelper.php @@ -13,12 +13,11 @@ class TypeHelper /** * Compare data types of some value * - * @param string $name Name of value * @param mixed $whatType What type has value * @param mixed $isType What type should be * @return bool */ - public static function checkIfTypeMismatch(string $name, $whatType, $isType): bool + public static function checkIfTypeMismatch($whatType, $isType): bool { return ($whatType !== $isType); }