Allow PhpStorm to understand the code better

(I followed suggestions from PhpStorm's inspections)
This commit is contained in:
Christian Bläul
2018-02-20 22:07:08 +01:00
parent 2206ec1e7c
commit 4cba97ad51

View File

@@ -33,6 +33,11 @@ class DatatypeEnum {
* Define validator functions here.
*
* @var array
*
* @uses isValidFloat
* @uses isValidInteger
* @uses isValidBoolean
* @uses isValidDate
*/
private static $validators = array(
self::TYPE_STRING => null,
@@ -61,10 +66,8 @@ class DatatypeEnum {
continue;
}
if (method_exists(__CLASS__, $validator)){
if (get_class()::$validator($value)) {
return $type;
}
if (method_exists(__CLASS__, $validator) && self::$validator($value)) {
return $type;
}
}