mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
Allow PhpStorm to understand the code better
(I followed suggestions from PhpStorm's inspections)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user