summaryrefslogtreecommitdiff
path: root/vendor/ruflin/elastica/lib/Elastica/Multi/ResultSet.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/ruflin/elastica/lib/Elastica/Multi/ResultSet.php')
-rw-r--r--vendor/ruflin/elastica/lib/Elastica/Multi/ResultSet.php39
1 files changed, 18 insertions, 21 deletions
diff --git a/vendor/ruflin/elastica/lib/Elastica/Multi/ResultSet.php b/vendor/ruflin/elastica/lib/Elastica/Multi/ResultSet.php
index a0df5785..4d4186af 100644
--- a/vendor/ruflin/elastica/lib/Elastica/Multi/ResultSet.php
+++ b/vendor/ruflin/elastica/lib/Elastica/Multi/ResultSet.php
@@ -1,44 +1,42 @@
<?php
-
namespace Elastica\Multi;
+
use Elastica\Exception\InvalidException;
use Elastica\Response;
-use Elastica\Search as BaseSearch;
use Elastica\ResultSet as BaseResultSet;
+use Elastica\Search as BaseSearch;
/**
* Elastica multi search result set
- * List of result sets for each search request
+ * List of result sets for each search request.
*
- * @category Xodoa
- * @package Elastica
* @author munkie
*/
class ResultSet implements \Iterator, \ArrayAccess, \Countable
{
/**
- * Result Sets
+ * Result Sets.
*
* @var array|\Elastica\ResultSet[] Result Sets
*/
protected $_resultSets = array();
/**
- * Current position
+ * Current position.
*
* @var int Current position
*/
protected $_position = 0;
/**
- * Response
+ * Response.
*
* @var \Elastica\Response Response object
*/
protected $_response;
/**
- * Constructs ResultSet object
+ * Constructs ResultSet object.
*
* @param \Elastica\Response $response
* @param array|\Elastica\Search[] $searches
@@ -50,8 +48,9 @@ class ResultSet implements \Iterator, \ArrayAccess, \Countable
}
/**
- * @param \Elastica\Response $response
- * @param array|\Elastica\Search[] $searches
+ * @param \Elastica\Response $response
+ * @param array|\Elastica\Search[] $searches
+ *
* @throws \Elastica\Exception\InvalidException
*/
protected function _init(Response $response, array $searches)
@@ -65,9 +64,9 @@ class ResultSet implements \Iterator, \ArrayAccess, \Countable
$currentSearch = each($searches);
if ($currentSearch === false) {
- throw new InvalidException('No result found for search #' . $key);
+ throw new InvalidException('No result found for search #'.$key);
} elseif (!$currentSearch['value'] instanceof BaseSearch) {
- throw new InvalidException('Invalid object for search #' . $key . ' provided. Should be Elastica\Search');
+ throw new InvalidException('Invalid object for search #'.$key.' provided. Should be Elastica\Search');
}
$search = $currentSearch['value'];
@@ -88,7 +87,7 @@ class ResultSet implements \Iterator, \ArrayAccess, \Countable
}
/**
- * Returns response object
+ * Returns response object.
*
* @return \Elastica\Response Response object
*/
@@ -98,7 +97,7 @@ class ResultSet implements \Iterator, \ArrayAccess, \Countable
}
/**
- * There is at least one result set with error
+ * There is at least one result set with error.
*
* @return bool
*/
@@ -126,7 +125,6 @@ class ResultSet implements \Iterator, \ArrayAccess, \Countable
}
/**
- * @return void
*/
public function next()
{
@@ -150,7 +148,6 @@ class ResultSet implements \Iterator, \ArrayAccess, \Countable
}
/**
- * @return void
*/
public function rewind()
{
@@ -166,8 +163,9 @@ class ResultSet implements \Iterator, \ArrayAccess, \Countable
}
/**
- * @param string|int $offset
- * @return boolean true on success or false on failure.
+ * @param string|int $offset
+ *
+ * @return bool true on success or false on failure.
*/
public function offsetExists($offset)
{
@@ -176,6 +174,7 @@ class ResultSet implements \Iterator, \ArrayAccess, \Countable
/**
* @param mixed $offset
+ *
* @return mixed Can return all value types.
*/
public function offsetGet($offset)
@@ -186,7 +185,6 @@ class ResultSet implements \Iterator, \ArrayAccess, \Countable
/**
* @param mixed $offset
* @param mixed $value
- * @return void
*/
public function offsetSet($offset, $value)
{
@@ -199,7 +197,6 @@ class ResultSet implements \Iterator, \ArrayAccess, \Countable
/**
* @param mixed $offset
- * @return void
*/
public function offsetUnset($offset)
{