Commit 44e420db authored by Ema Panz's avatar Ema Panz Committed by Markus Kalkbrenner

Updated PHP annotations and docblock (#526)

parent d88ed3fb
......@@ -38,7 +38,17 @@
*/
namespace Solarium\Core\Client;
use Solarium\Core\Client\Adapter\AdapterInterface;
use Solarium\Core\Plugin\PluginInterface;
use Solarium\Core\Query\QueryInterface;
use Solarium\Core\Query\Result\ResultInterface;
use Solarium\Exception\InvalidArgumentException;
use Solarium\Exception\OutOfBoundsException;
use Solarium\Exception\UnexpectedValueException;
use Solarium\QueryType\Analysis\Query\Document as AnalysisQueryDocument;
use Solarium\QueryType\Analysis\Query\Field as AnalysisQueryField;
use Solarium\QueryType\Analysis\Result\Document as AnalysisResultDocument;
use Solarium\QueryType\Analysis\Result\Field as AnalysisResultField;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
......@@ -320,7 +330,7 @@ interface ClientInterface
* $result = $client->ping($query);
* </code>
*
* @see Solarium\QueryType\Ping
* @see \Solarium\QueryType\Ping\Query
*
* @internal This is a convenience method that forwards the query to the
* execute method, thus allowing for an easy to use and clean API.
......@@ -404,9 +414,9 @@ interface ClientInterface
* @internal This is a convenience method that forwards the query to the
* execute method, thus allowing for an easy to use and clean API.
*
* @param QueryInterface|\Solarium\QueryType\Analysis\Query\Document|\Solarium\QueryType\Analysis\Query\Field $query
* @param QueryInterface|AnalysisQueryDocument|AnalysisQueryField $query
* @param Endpoint|string|null $endpoint
* @return \Solarium\QueryType\Analysis\Result\Document|\Solarium\QueryType\Analysis\Result\Field
* @return AnalysisResultDocument|AnalysisResultField
*/
public function analyze(QueryInterface $query, $endpoint = null);
......@@ -504,7 +514,7 @@ interface ClientInterface
* Create an analysis field query instance
*
* @param mixed $options
* @return \Solarium\QueryType\Analysis\Query\Field
* @return AnalysisQueryField
*/
public function createAnalysisField($options = null);
......@@ -512,7 +522,7 @@ interface ClientInterface
* Create an analysis document query instance
*
* @param mixed $options
* @return \Solarium\QueryType\Analysis\Query\Document
* @return AnalysisQueryDocument
*/
public function createAnalysisDocument($options = null);
......
......@@ -82,6 +82,8 @@ class PivotItem extends Pivot
*/
public function __construct($data)
{
parent::__construct([]);
$this->field = $data['field'];
$this->value = $data['value'];
$this->count = $data['count'];
......
......@@ -107,7 +107,7 @@ class Range extends Field
*/
public function __construct($values, $before, $after, $between, $start, $end, $gap)
{
$this->values = $values;
parent::__construct($values);
$this->before = $before;
$this->after = $after;
$this->between = $between;
......
......@@ -42,6 +42,12 @@ namespace Solarium\QueryType\Select\Result;
use Solarium\QueryType\Select\Query\Query as SelectQuery;
use Solarium\Core\Query\Result\QueryType as BaseResult;
use Solarium\QueryType\Select\Result\Spellcheck\Result as SpellCheckResult;
use Solarium\QueryType\Select\Result\Stats\Result as StatsResult;
use Solarium\QueryType\Select\Result\Debug\Result as DebugResult;
use Solarium\QueryType\Select\Result\Grouping\Result as GroupingResult;
use Solarium\QueryType\Select\Result\Highlighting\Result as HighlightingResult;
use Solarium\QueryType\Select\Result\MoreLikeThis\Result as MoreLikeThisResult;
/**
* Select query result.
......@@ -233,7 +239,7 @@ class Result extends BaseResult implements \IteratorAggregate, \Countable
if (isset($this->components[$key])) {
return $this->components[$key];
} else {
return;
return null;
}
}
......@@ -242,7 +248,7 @@ class Result extends BaseResult implements \IteratorAggregate, \Countable
*
* This is a convenience method that maps presets to getComponent
*
* @return \Solarium\QueryType\Select\Result\MoreLikeThis\Result
* @return MoreLikeThisResult|null
*/
public function getMoreLikeThis()
{
......@@ -254,7 +260,7 @@ class Result extends BaseResult implements \IteratorAggregate, \Countable
*
* This is a convenience method that maps presets to getComponent
*
* @return \Solarium\QueryType\Select\Result\Highlighting\Result
* @return HighlightingResult|null
*/
public function getHighlighting()
{
......@@ -266,7 +272,7 @@ class Result extends BaseResult implements \IteratorAggregate, \Countable
*
* This is a convenience method that maps presets to getComponent
*
* @return \Solarium\QueryType\Select\Result\Grouping\Result
* @return GroupingResult|null
*/
public function getGrouping()
{
......@@ -278,7 +284,7 @@ class Result extends BaseResult implements \IteratorAggregate, \Countable
*
* This is a convenience method that maps presets to getComponent
*
* @return FacetSet
* @return FacetSet|null
*/
public function getFacetSet()
{
......@@ -290,7 +296,7 @@ class Result extends BaseResult implements \IteratorAggregate, \Countable
*
* This is a convenience method that maps presets to getComponent
*
* @return \Solarium\QueryType\Select\Result\Spellcheck\Result
* @return SpellCheckResult|null
*/
public function getSpellcheck()
{
......@@ -302,7 +308,7 @@ class Result extends BaseResult implements \IteratorAggregate, \Countable
*
* This is a convenience method that maps presets to getComponent
*
* @return \Solarium\QueryType\Select\Result\Stats\Result
* @return StatsResult|null
*/
public function getStats()
{
......@@ -314,7 +320,7 @@ class Result extends BaseResult implements \IteratorAggregate, \Countable
*
* This is a convenience method that maps presets to getComponent
*
* @return \Solarium\QueryType\Select\Result\Debug\Result
* @return DebugResult|null
*/
public function getDebug()
{
......
......@@ -10,14 +10,14 @@ use Solarium\Core\Client\ClientInterface;
class Executor
{
/**
* @var Client
* @var ClientInterface
*/
private $client;
/**
* Constructor.
*
* @param \Solarium\Core\Client\ClientInterface $client
* @param ClientInterface $client
*/
public function __construct(ClientInterface $client)
{
......
......@@ -10,7 +10,7 @@ use Solarium\Core\Client\ClientInterface;
class Purger
{
/**
* @var Client
* @var ClientInterface
*/
private $client;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment