public static function inferDescriptor($descriptor)
    {
        if (isset($descriptor->type) && $descriptor->type == static::type()) {
            return new static($descriptor);
        } else {
            return false;
        }
    }
public static function inferDescriptor($descriptor)
    {
        if (isset($descriptor->type) && $descriptor->type == static::type()) {
            return new static($descriptor);
        } else {
            return false;
        }
    }
public static function inferDescriptor ( $ descriptor ) { if ( isset ( $ descriptor -> type ) && $ descriptor -> type == static :: type ( ) ) { return new static ( $ descriptor ) ; } else { return false ; } }
try to create a field object based on the descriptor
by default uses the type attribute
return the created field object or false if the descriptor does not match this field.

@param object $descriptor

@return bool|BaseField
try to create a field object based on the descriptor by default uses the type attribute return the created field object or false if the descriptor does not match this field .