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