Either end has is ok

{inheritDoc}
543476
public function has(/*# string */ $key)/*# : int */
    {
        // try front-end cache first
        $res = $this->frontHas($key);
        if ($res) {
            return $res;
        }

        // try backend cache
        return $this->backHas($key);
    }
246741
function has(obj, key) {
  var type = getGlobalType(obj);
  var func = defaultTypeAdaptorStorage.requireAdaptor(type, 'has');
  return func(obj, key);
}
751503
function validate($value, $key, $fields, $options, $exists, \CharlotteDunois\Validation\Validator $validator) {
        if(!$exists) {
            return false;
        }
        
        $is_string = \is_string($value);
        $is_object = \is_object($value);
        
        if(!$is_string && !$is_object) {
            return 'formvalidator_make_class';
        }
        
        $options = \explode('=', $options);
        $class = \ltrim($options[0], '\\');
        
        if(!empty($options[1]) && $options[1] === 'string' && !$is_string) {
            return 'formvalidator_make_class_stringonly';
        }
        
        if(!empty($options[1]) && $options[1] === 'object' && !$is_object) {
            return 'formvalidator_make_class_objectonly';
        }
        
        if($is_string && !\class_exists($value)) {
            return 'formvalidator_make_class';
        }
        
        if(!\is_a($value, $class, true) && !\is_subclass_of($value, $class, true)) {
            return array('formvalidator_make_class_inheritance', array('{0}' => $class));
        }
        
        return true;
    }
311007
@Override
    public void endElement(String uri, String name, String qName) {
	setContent(content.toString().trim());
	content = new StringBuilder();
	inside = "";
	if (qName.equals("function")) endFunction();
	else if (qName.equals("argument")) endArg();
	else if (qName.equals("return")) endReturn();
	else if (qName.equals("bundle")) endBundle();

    }
1191321
public function has($name, $checkAbstractFactories = true, $usePeeringServiceManagers = true)
    {
        if (is_array($name)) {
            $name = $name[1];
        }

        if (strpos($name, '://') === false) {
            return false;
        }

        list($manager, $service) = explode('://', $name, 2);
        if (!$manager || !$service) {
            return false;
        }

        $parent = $this->getParentLocator();
        $services = ($parent->has($manager, false, false))? $parent->get($manager) : false;
        return (($services instanceof ServiceLocatorInterface)
            && $services->has($service));
    }
536679
function hasPrecedence(op1, op2) {
    invariant(PRECEDENCE[op1] && PRECEDENCE[op2], `Missing precedence number for
            ${JSON.stringify(op1)} or ${JSON.stringify(op2)}.
            See ${JSON.stringify(PRECEDENCE)}`);

    return PRECEDENCE[op1] < PRECEDENCE[op2];
}
185363
def inheritdoc(method):
    
    method.__doc__ = getattr(str, method.__name__).__doc__
    return method
878020
public function isTerminalType()
    {
        if(!$this->hasValidResource()) {
            return false;
        }

        if (function_exists('stream_isatty')) {
            /** @noinspection PhpVoidFunctionResultUsedInspection */
            return (bool)stream_isatty($this->resource);
        }

        return false;
    }
1367514
public boolean inherits(ASTType astType, ASTType inheritable) {
        if (astType == null) {
            return false;
        }
        if(inheritable == null || inheritable.equals(OBJECT_TYPE)){
            return true;
        }
        if (astType.equals(inheritable)) {
            return true;
        }
        for (ASTType typeInterfaces : astType.getInterfaces()) {
            if (inherits(typeInterfaces, inheritable)) {
                return true;
            }
        }
        return inherits(astType.getSuperClass(), inheritable);
    }
439049
function compatible (middleware) {
	return function ($) {
		var req = $.request
		var res = $.response

		var $req = new Proxy(req, {
			defineProperty (target, prop, descriptor) {
				return Object.defineProperty(target, prop, descriptor) &&
					   Object.defineProperty($, prop, descriptor)
			},
			has (target, prop) {
				return prop in target || prop in $
			},
			get (target, prop) {
				return prop in target ? target[prop] : $[prop]
			},
			set (target, prop, value, receiver) {
				$[prop] = value
				target[prop] = value
				return true
			},
			deleteProperty (target, prop) {
				return (delete $[prop]) && (delete target[prop])
			}
		})

		middleware($req, res, function (err) {
			if (err)
				throw err
			$.return()
		})
	}
}
1186459
function isaTopLevelObject($) {return (
    ($.is("CONSTRUCTOR") && $.name.match(/^[A-Z][A-Za-z]+/)) ||
    ($.is("FUNCTION") && $.name.match(/^[A-Z][A-Za-z]+/)) ||
    $.comment.getTag("enum")[0] ||
    $.comment.getTag("interface")[0] ||
    $.isNamespace
  );}
180163
public function has($operator = '>=', $count = 1, $id = '*', $joinType = 'INNER')
    {
        $table    = $this->query->getTable();
        $model    = basename(str_replace('\\', '/', get_class($this->parent)));
        $relation = basename(str_replace('\\', '/', $this->model));

        return $this->parent->db()
            ->alias($model)
            ->field($model . '.*')
            ->join($table . ' ' . $relation, $model . '.' . $this->localKey . '=' . $relation . '.' . $this->foreignKey, $joinType)
            ->group($relation . '.' . $this->foreignKey)
            ->having('count(' . $id . ')' . $operator . $count);
    }
1131606
function it_can_execute_functions_conditionally_to_not_break_the_fluent_interface()
    {
        $this
            ->runIf(false, function() {
                $this->write('echo $message');
            })
            ->getSource()
            ->shouldReturn('<?php'.PHP_EOL)
        ;

        $this
            ->runIf(true, function() {
                $this->write('echo $message');
            })
            ->getSource()
            ->shouldMatch('/\Recho \$message/')
        ;
    }
753561
function (out) {
            var tplParam = out.templateParam;
            // normal inheritance processing: set out.parentClasspath, out.parentClassName and out.parentClassType
            if (tplParam.$extends) {
                out.parentClasspath = tplParam.$extends;
                out.parentClassType = this._classType;
            } else {
                out.parentClasspath = this._superClass;
            }
            if (out.parentClasspath) {
                out.parentClassName = this._getClassName(out.parentClasspath);
            }
        }
718098
function canCompile(filename, altExts) {
  var exts = altExts || canCompile.EXTENSIONS;
  var ext = _path2["default"].extname(filename);
  return _lodashCollectionContains2["default"](exts, ext);
}
614792
function (optionCollection, key, model, collection) {
        if (optionCollection) {
            return strTo(optionCollection, model, Collection) || collection;
        }
        return strTo(key, model, Collection) || null;
    }
1374260
function isGood()
    {
        $meta = stream_get_meta_data($this->stream);
        $mode = $meta['mode'];

        return false === strpos($mode, 'r') || true === strpos($mode, 'r+');
    }