protected function removeGetTrueIteratorCall(O\Expression $queryExpression)
{
//Removes the ->getTrueIterator() method call expression so when
//searching for applicable results the expression will be a common ancestor
if ($queryExpression instanceof O\MethodCallExpression) {
$nameExpression = $queryExpression->getName();
if ($nameExpression instanceof O\ValueExpression) {
if (strtolower($nameExpression->getValue()) === 'gettrueiterator') {
return $queryExpression->getValue();
}
}
}
return $queryExpression;
}