Called before conversion
550350
public function beforeConvert(ConvertEvent $convertEvent): void
    {
        if ($convertEvent->isHandledBy(SculpinMarkdownBundle::CONVERTER_NAME, SculpinTwigBundle::FORMATTER_NAME)) {
            $content = $convertEvent->source()->content();
            foreach (self::$addPlaceholderRe as $re) {
                $content = preg_replace($re, self::$placeholder, $content);
            }
            $content = preg_replace(
                '/{%\s+(\w+)\s+(\w+\++\w+)\s+%}(.*){%\s+end\1\s+%}/Us',
                '<div data-$1="$2">$3</div>',
                $content
            );
            $convertEvent->source()->setContent($content);
        }
    }
1324278
def converts_values(self):
        """"""
        return self.convert_value is not Formatter.convert_value or \
               self.convert_column is not Formatter.convert_column
199512
public static function PreCompile(){
            $oThis = self::CreateInstanceIfNotExists();
            $oThis->IncludeTemplate();
            $oThis->ReplaceVars();
            $oThis->RemoveUndefinedVars();
            $oThis->CheckConditions();
        }
513287
void convertWith(Converter converter, String... attributes) {
        for (String attribute : attributes) {
            convertWith(converter, attribute);
        }
    }
938091
function convert(ob, func){
			
		var oldFunc = ob[func];
		
		// if we don't have callbacks
		if(!ob[func].callbacks){
			//replace start with a function that will call ob2's method
			ob[func] = function(){
				var me = arguments.callee,
					ret;
				
				// call the original function
				ret = oldFunc.apply(ob,arguments);
				
				var cbs = me.callbacks,
					len = cbs.length;
				
				//mark as called so any callees added to this caller will
				//automatically get called
				me.called = true;
				// call other callbacks
				for(var i =0; i < len; i++){
					cbs[i].called()
				}
				return ret;
				
			}
			ob[func].callbacks = [];
		}

		return ob[func];
	}
711632
function before (el, newEl) {
  if (typeof newEl === 'string') {
    return el.insertAdjacentHTML('beforebegin', newEl)
  } else {
    return el.parentNode.insertBefore(newEl, el)
  }
}
327941
public void init(Converter converter, Converter converterAlt)
    {
        m_bEnableTranslation = true;
        m_bSetData = false;
        super.init(converter);
        if (converterAlt != null)
            this.addConverterToPass(converterAlt);
    }
967202
public void init(Convert converter)
    {
        m_converter = converter;
        Date dateTarget = (Date)m_converter.getData();
        String strLanguage = null;
        super.init(JCalendarPopup.DATE_PARAM, dateTarget, strLanguage);
    }
723017
function linsert(key, beforeAfter, pivot, value, req) {
  var val = this.getKey(key, req);
  if(val === undefined) return 0;
  return val.linsert(beforeAfter, pivot, value);
}
1147381
private void beforeValue() throws JSONException {
        if (stack.isEmpty()) {
            return;
        }

        Scope context = peek();
        if (context == Scope.EMPTY_ARRAY) { // first in array
            replaceTop(Scope.NONEMPTY_ARRAY);
            newline();
        } else if (context == Scope.NONEMPTY_ARRAY) { // another in array
            out.append(',');
            newline();
        } else if (context == Scope.DANGLING_KEY) { // value for key
            out.append(indent == null ? ":" : ": ");
            replaceTop(Scope.NONEMPTY_OBJECT);
        } else if (context != Scope.NULL) {
            throw new JSONException("Nesting problem");
        }
    }
5574
def before(base=_datetime, diff=None):
    
    _base = parse(base)
    if isinstance(_base, datetime.date):
        _base = midnight(_base)
    if not diff:
        return _base
    result_dict = dp(diff)
    # weeks already convert to days in diff_parse function(dp)
    for unit in result_dict:
        _val = result_dict[unit]
        if not _val:
            continue
        if unit == 'years':
            _base = _base.replace(year=(_base.year - _val))
        elif unit == 'months':
            if _base.month <= _val:
                _month_diff = 12 - (_val - _base.month)
                _base = _base.replace(year=_base.year - 1).replace(month=_month_diff)
            else:
                _base = _base.replace(month=_base.month - _val)
        elif unit in ['days', 'hours', 'minutes', 'seconds']:
            _base = _base - datetime.timedelta(**{unit: _val})
    return _base
141605
function linsert(beforeAfter, pivot, value) {
  //console.dir(pivot);
  //console.dir(this._data);
  var ind = this.indexOf(pivot);
  if(ind === -1) return ind;
  // note beforeAfter can be a buffer
  ind = (('' + beforeAfter) === BEFORE) ? ind : ind + 1;
  this._data.splice(ind, 0, value);
  return this._data.length;
}
976690
public static boolean valueChanged(Map<String, String> before, Map<String, String> after) {
        if ((before == null && after == null) || after == null) {
            return false;
        }
        if (before == null) {
            if (after.isEmpty()) {
                return false;
            } else {
                return true;
            }
        } else {
            if (before.size() != after.size()) {
                return true;
            }
            for (Entry<String, String> entry : after.entrySet()) {
                String key =  entry.getKey();
                String afterValue = entry.getValue();
                if (!before.containsKey(key)) {
                    return true;
                }
                String beforeValue = before.get(key);
                if (valueChanged(beforeValue, afterValue)) {
                    return true;
                }
            }
        }
        return false;
    }
143102
public static boolean valueChanged(String before, String after) {
        if ((before == null && after == null) || after == null) {
            return false;
        }

        if (before == null) {
            return true;
        }

        return !before.trim().equals(after.trim());
    }
669141
public static void registerTypeConversion(Conversion<?> conversion) {

		Object[] keys=conversion.getTypeKeys();
		if (keys==null) {
			return;
		}

		for (int i=0; i<keys.length; i++) {
			registerTypeConversion(keys[i],conversion);
		}
	}
1116335
public function beforeGenerate() {
    $this->writeln('<?php');
    $this->writeln(
      '# Generated by mfn/php-reflection-gen ' . Reflector::VERSION);
    $this->writeln('# PHP Version ' . phpversion());
  }
889582
def _before_insert(mapper, connection, target):
    """"""
    if target.position is None:
        func = sa.sql.func
        stmt = sa.select([func.coalesce(func.max(mapper.mapped_table.c.position), -1)])
        target.position = connection.execute(stmt).scalar() + 1