diff --git a/src/Traits/OverloadingGetter.php b/src/Traits/OverloadingGetter.php index 633df97..8a635c9 100644 --- a/src/Traits/OverloadingGetter.php +++ b/src/Traits/OverloadingGetter.php @@ -68,7 +68,7 @@ trait OverloadingGetter */ public function __isset(string $property): bool { - $value = $this->__get($property); + $value = $this->_data[$property] ?? null; return boolval($value) !== false; } } diff --git a/src/Traits/TypeChecker.php b/src/Traits/TypeChecker.php index 9a2042a..8fb8d55 100644 --- a/src/Traits/TypeChecker.php +++ b/src/Traits/TypeChecker.php @@ -96,10 +96,10 @@ trait TypeChecker */ public function hasAllowedType(mixed $value): bool { - if (count($this->getAllowedTypes()) === 0) { + if (count($this->_allowedTypes) === 0) { return true; } - foreach ($this->getAllowedTypes() as $type) { + foreach ($this->_allowedTypes as $type) { $function = 'is_' . $type; if (function_exists($function) && $function($value)) { return true; @@ -124,7 +124,7 @@ trait TypeChecker */ public function isAllowedType(string $type): bool { - return in_array($type, $this->getAllowedTypes(), true); + return in_array($type, $this->_allowedTypes, true); } /**