/** * @param SearchQueryExprValueBase $item * @param string|null $itemName * @return string * @throws \InvalidArgumentException */ protected function processItem(SearchQueryExprValueBase $item, $itemName = null) { if ($itemName === null && $item instanceof SearchQueryExprNamedItemInterface) { $itemName = $item->getName(); } $value = $item->getValue(); return $value instanceof SearchQueryExpr ? $this->processSubQueryValue($itemName, $value) : $this->processSimpleValue($itemName, $value, $item->getMatch()); }