/** * @param mixed $value * @param string[] $currentPath * @return mixed */ protected function processItem($value, array $currentPath) { $isArray = is_array($value); if ($isArray) { $isList = TpUtils::isList($value); if ($isList) { $processed = $this->processList($value, $currentPath); } else { $processed = $this->processHash($value, $currentPath); } } else { // Only arrays are treated specially. $processed = $value; } return $processed; }