// Hydrate the class this method is coming from in
// order to understand if it's an override or not
$class=$method->getClass($code_base);
$class->hydrate($code_base);
// Check to see if the method is an override
// $method->analyzeOverride($code_base);
// Make sure we're actually overriding something
// TODO(in another PR): check that signatures of magic methods are valid, if not done already (e.g. __get expects one param, most can't define return types, etc.)?
// XXX Not sure why this check was here but there are better checks elsewhere for real mismatches
continue;
}
// In php 7.2, it's ok to have a more relaxed type on an overriding method.
// In earlier versions it isn't.
// Because this check is analyzing phpdoc types, so it's fine for php < 7.2 as well. Use `PhanParamSignatureRealMismatch*` for detecting **real** mismatches.
* Previously, Phan bases the analysis off of phpdoc.
* Keeping that around(e.g. to check that string[] is compatible with string[])
* and also checking the **real**(non-phpdoc) types.
*
* @param $code_base
* @param $method - The overriding method
* @param $overridden_method - The overridden method. E.g. if a subclass overrid a base class implementation, then $overridden_method would be from the base class.