code: protected function extractLocationFromHit($hit)
      {
          return new Location(
              array(
                  'id' => (int)$hit->location_id,
                  'priority' => $hit->priority_i,
                  'hidden' => $hit->hidden_b,
                  'invisible' => $hit->invisible_b,
                  'remoteId' => $hit->remote_id_id,
                  'contentId' => (int)$hit->content_id_id,
                  'parentId' => (int)$hit->parent_id_id,
                  'pathString' => $hit->path_string_id,
                  'depth' => $hit->depth_i,
                  'sortField' => (int)$hit->sort_field_id,
                  'sortOrder' => (int)$hit->sort_order_id,
              )
          );
      }
docs: @param mixed $hit
  
  @return \eZ\Publish\SPI\Persistence\Content\Location