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.
|
* Define validator functions here.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
|
*
|
||||||
|
* @uses isValidFloat
|
||||||
|
* @uses isValidInteger
|
||||||
|
* @uses isValidBoolean
|
||||||
|
* @uses isValidDate
|
||||||
*/
|
*/
|
||||||
private static $validators = array(
|
private static $validators = array(
|
||||||
self::TYPE_STRING => null,
|
self::TYPE_STRING => null,
|
||||||
@@ -61,10 +66,8 @@ class DatatypeEnum {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (method_exists(__CLASS__, $validator)){
|
if (method_exists(__CLASS__, $validator) && self::$validator($value)) {
|
||||||
if (get_class()::$validator($value)) {
|
return $type;
|
||||||
return $type;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user