protected function getMethodByName(O\Expression $nameExpression, $mustBeStatic)
{
if ($nameExpression instanceof O\ValueExpression) {
$methodName = $nameExpression->getValue();
foreach ($this->methods as $otherMethodName => $method) {
if ((!$mustBeStatic || $method->getReflection()->isStatic() === true) && strcasecmp($methodName, $otherMethodName) === 0) {
return $method;
}
}
}
return null;
}