Skip to content

Commit

Permalink
Merge pull request #954 from mortenhauberg/fix-docblocks
Browse files Browse the repository at this point in the history
Fix docblocks
  • Loading branch information
ruflin committed Oct 15, 2015
2 parents 6fe305a + efc269b commit 9bb2ef1
Show file tree
Hide file tree
Showing 18 changed files with 45 additions and 27 deletions.
2 changes: 1 addition & 1 deletion lib/Elastica/Aggregation/AbstractTermsAggregation.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace Elastica\Aggregation;

/**
* Class AbstractTermsAggergation.
* Class AbstractTermsAggregation.
*/
abstract class AbstractTermsAggregation extends AbstractSimpleAggregation
{
Expand Down
10 changes: 7 additions & 3 deletions lib/Elastica/Aggregation/DateHistogram.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function setPostOffset($offset)
/**
* Set offset option.
*
* @param string
* @param string
*
* @return $this
*/
Expand All @@ -127,11 +127,15 @@ public function setFormat($format)
{
return $this->setParam('format', $format);
}

/**
* Set extended bounds option.
*
* @param string
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-histogram-aggregation.html#search-aggregations-bucket-histogram-aggregation-extended-bounds
*
* @param string $min see link for formatting options
*
* @param string $max see link for formatting options
*
* @return $this
*/
Expand Down
4 changes: 2 additions & 2 deletions lib/Elastica/Bulk.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public function addDocuments(array $documents, $opType = null)
}

/**
* @param \Elastica\Script $data
* @param \Elastica\Script $script
* @param string $opType
*
* @return $this
Expand Down Expand Up @@ -222,7 +222,7 @@ public function addScripts(array $scripts, $opType = null)
}

/**
* @param \Elastica\Script|\Elastica\Document\array $data
* @param \Elastica\Script|\Elastica\Document|array $data
* @param string $opType
*
* @return $this
Expand Down
2 changes: 1 addition & 1 deletion lib/Elastica/Bulk/Action/IndexDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function setDocument(Document $document)
}

/**
* @param \Elastica\AbstractUpdateAction $source
* @param \Elastica\AbstractUpdateAction $action
*
* @return array
*/
Expand Down
6 changes: 3 additions & 3 deletions lib/Elastica/Bulk/ResponseSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ public function current()
}
}

/**
*
/**
* @return void
*/
public function next()
{
Expand All @@ -124,7 +124,7 @@ public function valid()
}

/**
*
* @return void
*/
public function rewind()
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Elastica/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ public function setConnections(array $connections)
* @param array $ids Document ids
* @param string|\Elastica\Index $index Index name
* @param string|\Elastica\Type $type Type of documents
* @param string|false $routing Optional routing key for all ids
* @param string|bool $routing Optional routing key for all ids
*
* @throws \Elastica\Exception\InvalidException
*
Expand Down
4 changes: 2 additions & 2 deletions lib/Elastica/Filter/AbstractMulti.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ abstract class AbstractMulti extends AbstractFilter
*/
protected $_filters = array();

/**
* @param \Elastica\Filter\AbstractFilter $filters
/**
* @param array $filters
*/
public function __construct(array $filters = array())
{
Expand Down
6 changes: 4 additions & 2 deletions lib/Elastica/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public function createSearch($query = '', $options = null)
* @param string|array|\Elastica\Query $query Array with all query data inside or a Elastica\Query object
* @param int|array $options OPTIONAL Limit or associative array of options (option=>value)
*
* @return \Elastica\ResultSet ResultSet with all results inside
* @return \Elastica\ResultSet with all results inside
*
* @see \Elastica\SearchableInterface::search
*/
Expand Down Expand Up @@ -452,7 +452,9 @@ public function clearCache()
/**
* Flushes the index to storage.
*
* @return \Elastica\Response Response object
* @param bool $refresh
*
* @return Response Response object
*
* @link http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html
*/
Expand Down
1 change: 0 additions & 1 deletion lib/Elastica/Query/FunctionScore.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ public function addScriptScoreFunction(Script $script, AbstractFilter $filter =
* @param string $scale a scale to define the rate of decay for this function
* @param string $offset If defined, this function will only be computed for documents with a distance from the origin greater than this value
* @param float $decay optionally defines how documents are scored at the distance given by the $scale parameter
* @param float $scaleWeight optional factor by which to multiply the score at the value provided by the $scale parameter
* @param float $weight optional factor by which to multiply the score at the value provided by the $scale parameter
* @param AbstractFilter $filter a filter associated with this function
*
Expand Down
4 changes: 4 additions & 0 deletions lib/Elastica/Query/Fuzzy.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ public function setFieldOption($param, $value)
* Deprecated method of setting a field.
*
* @deprecated
*
* @param $fieldName
* @param $args
* @return $this
*/
public function addField($fieldName, $args)
{
Expand Down
1 change: 0 additions & 1 deletion lib/Elastica/Query/MultiMatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ public function setCutoffFrequency($cutoffFrequency)
/**
* Set type.
*
* @param string $field
* @param string $type
*
* @return $this
Expand Down
5 changes: 2 additions & 3 deletions lib/Elastica/Rescore/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class Query extends AbstractRescore
/**
* Constructor.
*
* @param string|\Elastica\Query\AbstractQuery $rescoreQuery
* @param string|\Elastica\Query\AbstractQuery $query
*/
public function __construct($query = null)
Expand Down Expand Up @@ -50,7 +49,7 @@ public function toArray()
/**
* Sets rescoreQuery object.
*
* @param string|\Elastica\Query|\Elastica\Query\AbstractQuery $query
* @param string|\Elastica\Query|\Elastica\Query\AbstractQuery $rescoreQuery
*
* @return $this
*/
Expand Down Expand Up @@ -82,7 +81,7 @@ public function setQueryWeight($weight)
/**
* Sets rescore_query_weight.
*
* @param float $size
* @param float $weight
*
* @return $this
*/
Expand Down
6 changes: 4 additions & 2 deletions lib/Elastica/SearchableInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ interface SearchableInterface
*
* @param string|array|\Elastica\Query $query Array with all query data inside or a Elastica\Query object
*
* @return \Elastica\ResultSet ResultSet with all results inside
* @param null $options
*
* @return \Elastica\ResultSet with all results inside
*/
public function search($query = '', $options = null);

Expand All @@ -43,7 +45,7 @@ public function search($query = '', $options = null);
public function count($query = '');

/**
* @param \Elastica\Query $query
* @param \Elastica\Query|string $query
* @param array $options
*
* @return \Elastica\Search
Expand Down
2 changes: 1 addition & 1 deletion lib/Elastica/Suggest/Completion.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace Elastica\Suggest;

/**
* Comletion suggester.
* Completion suggester.
*
* @author Igor Denisenko <[email protected]>
*
Expand Down
4 changes: 4 additions & 0 deletions lib/Elastica/Transport/Guzzle.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ protected function _getGuzzleClient($baseUrl, $persistent = true)
* Builds the base url for the guzzle connection.
*
* @param \Elastica\Connection $connection
*
* @return string
*/
protected function _getBaseUrl(Connection $connection)
{
Expand All @@ -161,6 +163,8 @@ protected function _getBaseUrl(Connection $connection)
* Builds the action path url for each request.
*
* @param \Elastica\Request $request
*
* @return string
*/
protected function _getActionPath(Request $request)
{
Expand Down
3 changes: 3 additions & 0 deletions lib/Elastica/Transport/HttpAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class HttpAdapter extends AbstractTransport

/**
* Construct transport.
*
* @param Connection $connection
* @param HttpAdapterInterface $httpAdapter
*/
public function __construct(Connection $connection = null, HttpAdapterInterface $httpAdapter)
{
Expand Down
4 changes: 2 additions & 2 deletions lib/Elastica/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public function createSearch($query = '', $options = null)
* @param string|array|\Elastica\Query $query Array with all query data inside or a Elastica\Query object
* @param int|array $options OPTIONAL Limit or associative array of options (option=>value)
*
* @return \Elastica\ResultSet ResultSet with all results inside
* @return \Elastica\ResultSet with all results inside
*
* @see \Elastica\SearchableInterface::search
*/
Expand Down Expand Up @@ -456,7 +456,7 @@ public function deleteById($id, array $options = array())
* Deletes the given list of ids from this type.
*
* @param array $ids
* @param string|false $routing Optional routing key for all ids
* @param string|bool $routing Optional routing key for all ids
*
* @return \Elastica\Response Response object
*/
Expand Down
6 changes: 4 additions & 2 deletions lib/Elastica/Type/AbstractType.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function create($recreate = false)
}

/**
* @param \Elastica\Query $query
* @param string|\Elastica\Query $query
* @param array|int $options
*
* @return \Elastica\Search
Expand All @@ -146,7 +146,9 @@ public function createSearch($query = '', $options = null)
*
* @param string|array|\Elastica\Query $query Array with all query data inside or a Elastica\Query object
*
* @return \Elastica\ResultSet ResultSet with all results inside
* @param null $options
*
* @return \Elastica\ResultSet with all results inside
*
* @see \Elastica\SearchableInterface::search
*/
Expand Down

0 comments on commit 9bb2ef1

Please sign in to comment.