private function getFieldType($field): ?string
    {
        if ($field === null) {
            return null;
        }

        $fieldType = gettype($field);
        if ($fieldType === 'object') {
            $classNameArray = explode('\\', get_class($field));
            if (count($classNameArray) === 0) {
                return null;
            }

            $fieldType = mb_strtolower($classNameArray[count($classNameArray) - 1]);
        }

        return $fieldType;
    }
private function getFieldType($field): ?string
    {
        if ($field === null) {
            return null;
        }

        $fieldType = gettype($field);
        if ($fieldType === 'object') {
            $classNameArray = explode('\\', get_class($field));
            if (count($classNameArray) === 0) {
                return null;
            }

            $fieldType = mb_strtolower($classNameArray[count($classNameArray) - 1]);
        }

        return $fieldType;
    }
private function getFieldType ( $ field ) : ? string { if ( $ field === null ) { return null ; } $ fieldType = gettype ( $ field ) ; if ( $ fieldType === 'object' ) { $ classNameArray = explode ( '\\' , get_class ( $ field ) ) ; if ( count ( $ classNameArray ) === 0 ) { return null ; } $ fieldType = mb_strtolower ( $ classNameArray [ count ( $ classNameArray ) - 1 ] ) ; } return $ fieldType ; }
Returns the field type of the provided field.

@param mixed $field

@return string|null
Returns the field type of the provided field .