Commit 5d9b6d5e authored by Bas de Nooijer's avatar Bas de Nooijer

php-cs-fixer changes

parent fc819735
...@@ -131,8 +131,8 @@ class Curl extends Configurable implements AdapterInterface ...@@ -131,8 +131,8 @@ class Curl extends Configurable implements AdapterInterface
* Create curl handle for a request * Create curl handle for a request
* *
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @param Request $request * @param Request $request
* @param Endpoint $endpoint * @param Endpoint $endpoint
* @return resource * @return resource
*/ */
public function createHandle($request, $endpoint) public function createHandle($request, $endpoint)
......
...@@ -43,7 +43,6 @@ use Solarium\Core\Client\Response; ...@@ -43,7 +43,6 @@ use Solarium\Core\Client\Response;
use Solarium\Core\Client\Endpoint; use Solarium\Core\Client\Endpoint;
use Solarium\Exception\HttpException; use Solarium\Exception\HttpException;
/** /**
* Basic HTTP adapter using a stream * Basic HTTP adapter using a stream
*/ */
...@@ -54,8 +53,8 @@ class Http extends Configurable implements AdapterInterface ...@@ -54,8 +53,8 @@ class Http extends Configurable implements AdapterInterface
* Handle Solr communication * Handle Solr communication
* *
* @throws HttpException * @throws HttpException
* @param Request $request * @param Request $request
* @param Endpoint $endpoint * @param Endpoint $endpoint
* @return Response * @return Response
*/ */
public function execute($request, $endpoint) public function execute($request, $endpoint)
......
...@@ -76,8 +76,8 @@ class PeclHttp extends Configurable implements AdapterInterface ...@@ -76,8 +76,8 @@ class PeclHttp extends Configurable implements AdapterInterface
* Execute a Solr request using the Pecl Http * Execute a Solr request using the Pecl Http
* *
* @throws HttpException * @throws HttpException
* @param Request $request * @param Request $request
* @param Endpoint $endpoint * @param Endpoint $endpoint
* @return Response * @return Response
*/ */
public function execute($request, $endpoint) public function execute($request, $endpoint)
...@@ -133,8 +133,8 @@ class PeclHttp extends Configurable implements AdapterInterface ...@@ -133,8 +133,8 @@ class PeclHttp extends Configurable implements AdapterInterface
* HTTP Predefined Constant} * HTTP Predefined Constant}
* *
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @param Request $request * @param Request $request
* @param Endpoint $endpoint * @param Endpoint $endpoint
* @param HttpRequest * @param HttpRequest
*/ */
public function toHttpRequest($request, $endpoint) public function toHttpRequest($request, $endpoint)
......
...@@ -46,7 +46,6 @@ use Solarium\Core\Client\Request; ...@@ -46,7 +46,6 @@ use Solarium\Core\Client\Request;
use Solarium\Core\Client\Response; use Solarium\Core\Client\Response;
use Solarium\Core\Client\Endpoint; use Solarium\Core\Client\Endpoint;
use Solarium\Exception\HttpException; use Solarium\Exception\HttpException;
use Solarium\Exception\RuntimeException;
use Solarium\Exception\OutOfBoundsException; use Solarium\Exception\OutOfBoundsException;
/** /**
...@@ -162,8 +161,8 @@ class ZendHttp extends Configurable implements AdapterInterface ...@@ -162,8 +161,8 @@ class ZendHttp extends Configurable implements AdapterInterface
* Execute a Solr request using the Zend_Http_Client instance * Execute a Solr request using the Zend_Http_Client instance
* *
* @throws HttpException * @throws HttpException
* @param Request $request * @param Request $request
* @param Endpoint $endpoint * @param Endpoint $endpoint
* @return Response * @return Response
*/ */
public function execute($request, $endpoint) public function execute($request, $endpoint)
...@@ -211,8 +210,8 @@ class ZendHttp extends Configurable implements AdapterInterface ...@@ -211,8 +210,8 @@ class ZendHttp extends Configurable implements AdapterInterface
* Prepare a solarium response from the given request and client * Prepare a solarium response from the given request and client
* response * response
* *
* @param Request $request * @param Request $request
* @param \Zend_Http_Response $response * @param \Zend_Http_Response $response
* @return Response * @return Response
*/ */
protected function prepareResponse($request, $response) protected function prepareResponse($request, $response)
...@@ -239,8 +238,8 @@ class ZendHttp extends Configurable implements AdapterInterface ...@@ -239,8 +238,8 @@ class ZendHttp extends Configurable implements AdapterInterface
/** /**
* Prepare the client to send the file and params in request * Prepare the client to send the file and params in request
* *
* @param \Zend_Http_Client $client * @param \Zend_Http_Client $client
* @param Request $request * @param Request $request
* @return void * @return void
*/ */
protected function prepareFileUpload($client, $request) protected function prepareFileUpload($client, $request)
......
...@@ -59,7 +59,6 @@ use Solarium\Core\Event\PostExecute as PostExecuteEvent; ...@@ -59,7 +59,6 @@ use Solarium\Core\Event\PostExecute as PostExecuteEvent;
use Solarium\Core\Event\PreExecuteRequest as PreExecuteRequestEvent; use Solarium\Core\Event\PreExecuteRequest as PreExecuteRequestEvent;
use Solarium\Core\Event\PostExecuteRequest as PostExecuteRequestEvent; use Solarium\Core\Event\PostExecuteRequest as PostExecuteRequestEvent;
/** /**
* Main interface for interaction with Solr * Main interface for interaction with Solr
* *
...@@ -265,8 +264,8 @@ class Client extends Configurable ...@@ -265,8 +264,8 @@ class Client extends Configurable
* In case of options a new endpoint instance wil be created based on the options. * In case of options a new endpoint instance wil be created based on the options.
* *
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @param Endpoint|array $endpoint * @param Endpoint|array $endpoint
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function addEndpoint($endpoint) public function addEndpoint($endpoint)
{ {
...@@ -321,7 +320,7 @@ class Client extends Configurable ...@@ -321,7 +320,7 @@ class Client extends Configurable
* Get an endpoint by key * Get an endpoint by key
* *
* @throws OutOfBoundsException * @throws OutOfBoundsException
* @param string $key * @param string $key
* @return Endpoint * @return Endpoint
*/ */
public function getEndpoint($key = null) public function getEndpoint($key = null)
...@@ -399,8 +398,8 @@ class Client extends Configurable ...@@ -399,8 +398,8 @@ class Client extends Configurable
* *
* All queries executed without a specific endpoint will use this default endpoint. * All queries executed without a specific endpoint will use this default endpoint.
* *
* @param string|Endpoint $endpoint * @param string|Endpoint $endpoint
* @return self Provides fluent interface * @return self Provides fluent interface
* @throws OutOfBoundsException * @throws OutOfBoundsException
*/ */
public function setDefaultEndpoint($endpoint) public function setDefaultEndpoint($endpoint)
...@@ -489,7 +488,7 @@ class Client extends Configurable ...@@ -489,7 +488,7 @@ class Client extends Configurable
* If {@see $adapter} doesn't hold an instance a new one will be created by * If {@see $adapter} doesn't hold an instance a new one will be created by
* calling {@see createAdapter()} * calling {@see createAdapter()}
* *
* @param boolean $autoload * @param boolean $autoload
* @return AdapterInterface * @return AdapterInterface
*/ */
public function getAdapter($autoload = true) public function getAdapter($autoload = true)
...@@ -569,10 +568,10 @@ class Client extends Configurable ...@@ -569,10 +568,10 @@ class Client extends Configurable
* or a manual require. * or a manual require.
* *
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @param string $key * @param string $key
* @param string|PluginInterface $plugin * @param string|PluginInterface $plugin
* @param array $options * @param array $options
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function registerPlugin($key, $plugin, $options = array()) public function registerPlugin($key, $plugin, $options = array())
{ {
...@@ -630,8 +629,8 @@ class Client extends Configurable ...@@ -630,8 +629,8 @@ class Client extends Configurable
* Get a plugin instance * Get a plugin instance
* *
* @throws OutOfBoundsException * @throws OutOfBoundsException
* @param string $key * @param string $key
* @param boolean $autocreate * @param boolean $autocreate
* @return PluginInterface|null * @return PluginInterface|null
*/ */
public function getPlugin($key, $autocreate = true) public function getPlugin($key, $autocreate = true)
...@@ -657,7 +656,7 @@ class Client extends Configurable ...@@ -657,7 +656,7 @@ class Client extends Configurable
* You can remove a plugin by passing the plugin key, or the plugin instance * You can remove a plugin by passing the plugin key, or the plugin instance
* *
* @param string|PluginInterface $plugin * @param string|PluginInterface $plugin
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function removePlugin($plugin) public function removePlugin($plugin)
{ {
...@@ -681,7 +680,7 @@ class Client extends Configurable ...@@ -681,7 +680,7 @@ class Client extends Configurable
* Creates a request based on a query instance * Creates a request based on a query instance
* *
* @throws UnexpectedValueException * @throws UnexpectedValueException
* @param QueryInterface $query * @param QueryInterface $query
* @return Request * @return Request
*/ */
public function createRequest(QueryInterface $query) public function createRequest(QueryInterface $query)
...@@ -711,8 +710,8 @@ class Client extends Configurable ...@@ -711,8 +710,8 @@ class Client extends Configurable
* Creates a result object * Creates a result object
* *
* @throws UnexpectedValueException; * @throws UnexpectedValueException;
* @param QueryInterface $query * @param QueryInterface $query
* @param array Response $response * @param array Response $response
* @return ResultInterface * @return ResultInterface
*/ */
public function createResult(QueryInterface $query, $response) public function createResult(QueryInterface $query, $response)
...@@ -959,8 +958,8 @@ class Client extends Configurable ...@@ -959,8 +958,8 @@ class Client extends Configurable
* Create a query instance * Create a query instance
* *
* @throws InvalidArgumentException|UnexpectedValueException * @throws InvalidArgumentException|UnexpectedValueException
* @param string $type * @param string $type
* @param array $options * @param array $options
* @return \Solarium\Core\Query\Query * @return \Solarium\Core\Query\Query
*/ */
public function createQuery($type, $options = null) public function createQuery($type, $options = null)
...@@ -1083,7 +1082,7 @@ class Client extends Configurable ...@@ -1083,7 +1082,7 @@ class Client extends Configurable
/** /**
* Create an extract query instance * Create an extract query instance
* *
* @param mixed $options * @param mixed $options
* @return \Solarium\QueryType\Extract\Query * @return \Solarium\QueryType\Extract\Query
*/ */
public function createExtract($options = null) public function createExtract($options = null)
......
...@@ -324,7 +324,7 @@ class Request extends Configurable ...@@ -324,7 +324,7 @@ class Request extends Configurable
/** /**
* Set the file to upload via "multipart/form-data" POST request * Set the file to upload via "multipart/form-data" POST request
* *
* @param string $filename Name of file to upload * @param string $filename Name of file to upload
* @return self * @return self
*/ */
public function setFileUpload($filename) public function setFileUpload($filename)
...@@ -334,6 +334,7 @@ class Request extends Configurable ...@@ -334,6 +334,7 @@ class Request extends Configurable
} }
$this->setOption('file', $filename); $this->setOption('file', $filename);
return $this; return $this;
} }
...@@ -459,13 +460,15 @@ class Request extends Configurable ...@@ -459,13 +460,15 @@ class Request extends Configurable
* *
* If one or both values are NULL authentication will be disabled * If one or both values are NULL authentication will be disabled
* *
* @param string $username * @param string $username
* @param string $password * @param string $password
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function setAuthentication($username, $password) { public function setAuthentication($username, $password)
{
$this->setOption('username', $username); $this->setOption('username', $username);
$this->setOption('password', $password); $this->setOption('password', $password);
return $this; return $this;
} }
......
...@@ -131,7 +131,7 @@ class Response ...@@ -131,7 +131,7 @@ class Response
* Set headers * Set headers
* *
* @throws HttpException * @throws HttpException
* @param array $headers * @param array $headers
* @return void * @return void
*/ */
public function setHeaders($headers) public function setHeaders($headers)
......
...@@ -66,7 +66,7 @@ class Configurable implements ConfigurableInterface ...@@ -66,7 +66,7 @@ class Configurable implements ConfigurableInterface
* After handling the options the {@link _init()} method is called. * After handling the options the {@link _init()} method is called.
* *
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @param array|\Zend_Config $options * @param array|\Zend_Config $options
* @return void * @return void
*/ */
public function __construct($options = null) public function __construct($options = null)
...@@ -86,8 +86,8 @@ class Configurable implements ConfigurableInterface ...@@ -86,8 +86,8 @@ class Configurable implements ConfigurableInterface
* Zend Framework, but can also easily be implemented in any other object. * Zend Framework, but can also easily be implemented in any other object.
* *
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @param array|\Zend_Config $options * @param array|\Zend_Config $options
* @param boolean $overwrite True for overwriting existing options, false * @param boolean $overwrite True for overwriting existing options, false
* for merging (new values overwrite old ones if needed) * for merging (new values overwrite old ones if needed)
* *
* @return void * @return void
......
...@@ -58,7 +58,7 @@ interface ConfigurableInterface ...@@ -58,7 +58,7 @@ interface ConfigurableInterface
* After handling the options the {@link _init()} method is called. * After handling the options the {@link _init()} method is called.
* *
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @param array|\Zend_Config $options * @param array|\Zend_Config $options
* @return void * @return void
*/ */
public function __construct($options = null); public function __construct($options = null);
...@@ -71,8 +71,8 @@ interface ConfigurableInterface ...@@ -71,8 +71,8 @@ interface ConfigurableInterface
* Zend Framework, but can also easily be implemented in any other object. * Zend Framework, but can also easily be implemented in any other object.
* *
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @param array|\Zend_Config $options * @param array|\Zend_Config $options
* @param boolean $overwrite True for overwriting existing options, false * @param boolean $overwrite True for overwriting existing options, false
* for merging (new values overwrite old ones if needed) * for merging (new values overwrite old ones if needed)
* *
* @return void * @return void
......
...@@ -64,8 +64,8 @@ class PostCreateQuery extends Event ...@@ -64,8 +64,8 @@ class PostCreateQuery extends Event
/** /**
* Event constructor * Event constructor
* *
* @param string $type * @param string $type
* @param array $query * @param array $query
* @param QueryInterface $query * @param QueryInterface $query
*/ */
public function __construct($type, $options, QueryInterface $query) public function __construct($type, $options, QueryInterface $query)
......
...@@ -66,8 +66,8 @@ class PostCreateResult extends Event ...@@ -66,8 +66,8 @@ class PostCreateResult extends Event
/** /**
* Event constructor * Event constructor
* *
* @param QueryInterface $query * @param QueryInterface $query
* @param Response $response * @param Response $response
* @param ResultInterface $result * @param ResultInterface $result
*/ */
public function __construct(QueryInterface $query, Response $response, ResultInterface $result) public function __construct(QueryInterface $query, Response $response, ResultInterface $result)
......
...@@ -60,7 +60,7 @@ class PostExecute extends Event ...@@ -60,7 +60,7 @@ class PostExecute extends Event
/** /**
* Event constructor * Event constructor
* *
* @param QueryInterface $query * @param QueryInterface $query
* @param ResultInterface $result * @param ResultInterface $result
*/ */
public function __construct(QueryInterface $query, ResultInterface $result) public function __construct(QueryInterface $query, ResultInterface $result)
......
...@@ -66,7 +66,7 @@ class PostExecuteRequest extends Event ...@@ -66,7 +66,7 @@ class PostExecuteRequest extends Event
/** /**
* Event constructor * Event constructor
* *
* @param Request $request * @param Request $request
* @param Endpoint $endpoint * @param Endpoint $endpoint
* @param Response $response * @param Response $response
*/ */
......
...@@ -64,7 +64,7 @@ class PreCreateQuery extends Event ...@@ -64,7 +64,7 @@ class PreCreateQuery extends Event
/** /**
* Event constructor * Event constructor
* *
* @param string $type * @param string $type
* @param array|null $query * @param array|null $query
*/ */
public function __construct($type, $options) public function __construct($type, $options)
...@@ -86,7 +86,7 @@ class PreCreateQuery extends Event ...@@ -86,7 +86,7 @@ class PreCreateQuery extends Event
/** /**
* Set the query object for this event, this overrides default execution * Set the query object for this event, this overrides default execution
* *
* @param QueryInterface $query * @param QueryInterface $query
* @return void * @return void
*/ */
public function setQuery($query) public function setQuery($query)
......
...@@ -82,7 +82,7 @@ class PreCreateRequest extends Event ...@@ -82,7 +82,7 @@ class PreCreateRequest extends Event
* *
* If you set this request value the default execution is skipped and this request is directly returned * If you set this request value the default execution is skipped and this request is directly returned
* *
* @param Request $request * @param Request $request
* @return void * @return void
*/ */
public function setRequest(Request $request) public function setRequest(Request $request)
......
...@@ -67,7 +67,7 @@ class PreCreateResult extends Event ...@@ -67,7 +67,7 @@ class PreCreateResult extends Event
* Event constructor * Event constructor
* *
* @param QueryInterface $query * @param QueryInterface $query
* @param Response $response * @param Response $response
*/ */
public function __construct(QueryInterface $query, Response $response) public function __construct(QueryInterface $query, Response $response)
{ {
...@@ -108,7 +108,7 @@ class PreCreateResult extends Event ...@@ -108,7 +108,7 @@ class PreCreateResult extends Event
/** /**
* Set the result object for this event, overrides default execution * Set the result object for this event, overrides default execution
* *
* @param ResultInterface $result * @param ResultInterface $result
* @return void * @return void
*/ */
public function setResult($result) public function setResult($result)
......
...@@ -90,7 +90,7 @@ class PreExecute extends Event ...@@ -90,7 +90,7 @@ class PreExecute extends Event
/** /**
* Set the result object for this event, overrides default execution * Set the result object for this event, overrides default execution
* *
* @param ResultInterface $result * @param ResultInterface $result
* @return void * @return void
*/ */
public function setResult($result) public function setResult($result)
......
...@@ -66,7 +66,7 @@ class PreExecuteRequest extends Event ...@@ -66,7 +66,7 @@ class PreExecuteRequest extends Event
/** /**
* Event constructor * Event constructor
* *
* @param Request $request * @param Request $request
* @param Endpoint $endpoint * @param Endpoint $endpoint
*/ */
public function __construct(Request $request, Endpoint $endpoint) public function __construct(Request $request, Endpoint $endpoint)
...@@ -98,7 +98,7 @@ class PreExecuteRequest extends Event ...@@ -98,7 +98,7 @@ class PreExecuteRequest extends Event
/** /**
* Get the request object for this event * Get the request object for this event
* *
* @param Request $request * @param Request $request
* @return void * @return void
*/ */
public function setRequest($request) public function setRequest($request)
...@@ -119,7 +119,7 @@ class PreExecuteRequest extends Event ...@@ -119,7 +119,7 @@ class PreExecuteRequest extends Event
/** /**
* Set the response object for this event, overrides default execution * Set the response object for this event, overrides default execution
* *
* @param Response $response * @param Response $response
* @return void * @return void
*/ */
public function setResponse($response) public function setResponse($response)
......
...@@ -40,9 +40,6 @@ namespace Solarium\Core\Plugin; ...@@ -40,9 +40,6 @@ namespace Solarium\Core\Plugin;
use Solarium\Core\Client\Client; use Solarium\Core\Client\Client;
use Solarium\Core\Configurable; use Solarium\Core\Configurable;
use Solarium\Core\Query\Query; use Solarium\Core\Query\Query;
use Solarium\Core\Client\Request;
use Solarium\Core\Client\Response;
use Solarium\Core\Query\Result\Result;
/** /**
* Base class for plugins * Base class for plugins
......
...@@ -40,9 +40,6 @@ namespace Solarium\Core\Plugin; ...@@ -40,9 +40,6 @@ namespace Solarium\Core\Plugin;
use Solarium\Core\ConfigurableInterface; use Solarium\Core\ConfigurableInterface;
use Solarium\Core\Client\Client; use Solarium\Core\Client\Client;
use Solarium\Core\Query\Query; use Solarium\Core\Query\Query;
use Solarium\Core\Client\Request;
use Solarium\Core\Client\Response;
use Solarium\Core\Query\Result\Result;
/** /**
* Interface for plugins * Interface for plugins
......
...@@ -286,9 +286,9 @@ class Helper ...@@ -286,9 +286,9 @@ class Helper
* Render a qparser plugin call * Render a qparser plugin call
* *
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @param string $name * @param string $name
* @param array $params * @param array $params
* @param boolean $dereferenced * @param boolean $dereferenced
* @return string * @return string
*/ */
public function qparser($name, $params = array(), $dereferenced = false) public function qparser($name, $params = array(), $dereferenced = false)
...@@ -369,7 +369,7 @@ class Helper ...@@ -369,7 +369,7 @@ class Helper
* Render placeholders in a querystring * Render placeholders in a querystring
* *
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @param array $matches * @param array $matches
* @return string * @return string
*/ */
protected function renderPlaceHolder($matches) protected function renderPlaceHolder($matches)
......
...@@ -180,7 +180,7 @@ abstract class Query extends Configurable implements QueryInterface ...@@ -180,7 +180,7 @@ abstract class Query extends Configurable implements QueryInterface
* Set responsewriter option * Set responsewriter option
* *
* @param string $value * @param string $value
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function setResponseWriter($value) public function setResponseWriter($value)
{ {
...@@ -201,7 +201,7 @@ abstract class Query extends Configurable implements QueryInterface ...@@ -201,7 +201,7 @@ abstract class Query extends Configurable implements QueryInterface
public function getResponseWriter() public function getResponseWriter()
{ {
$responseWriter = $this->getOption('responsewriter'); $responseWriter = $this->getOption('responsewriter');
if ($responseWriter === null ) { if ($responseWriter === null) {
$responseWriter = self::WT_JSON; $responseWriter = self::WT_JSON;
} }
......
...@@ -63,7 +63,7 @@ abstract class ResponseParser ...@@ -63,7 +63,7 @@ abstract class ResponseParser
$key = $data[$i]; $key = $data[$i];
$value = $data[$i+1]; $value = $data[$i+1];
if (array_key_exists($key, $keys)) { if (array_key_exists($key, $keys)) {
if($keys[$key] == 1) { if ($keys[$key] == 1) {
$result[$key] = array($result[$key]); $result[$key] = array($result[$key]);
} }
$result[$key][] = $value; $result[$key][] = $value;
...@@ -80,8 +80,8 @@ abstract class ResponseParser ...@@ -80,8 +80,8 @@ abstract class ResponseParser
/** /**
* Parses header data (if available) and adds it to result data * Parses header data (if available) and adds it to result data
* *
* @param array $data * @param array $data
* @param array $result * @param array $result
* @return mixed * @return mixed
*/ */
public function addHeaderInfo($data, $result) public function addHeaderInfo($data, $result)
......
...@@ -87,9 +87,9 @@ class Result implements ResultInterface ...@@ -87,9 +87,9 @@ class Result implements ResultInterface
* Constructor * Constructor
* *
* @throws HttpException * @throws HttpException
* @param Client $client * @param Client $client
* @param Query $query * @param Query $query
* @param Response $response * @param Response $response
* @return void * @return void
*/ */
public function __construct($client, $query, $response) public function __construct($client, $query, $response)
......
...@@ -42,7 +42,6 @@ use Solarium\Core\Plugin\Plugin; ...@@ -42,7 +42,6 @@ use Solarium\Core\Plugin\Plugin;
use Solarium\QueryType\Update\Result as UpdateResult; use Solarium\QueryType\Update\Result as UpdateResult;
use Solarium\QueryType\Update\Query\Query as UpdateQuery; use Solarium\QueryType\Update\Query\Query as UpdateQuery;
use Solarium\QueryType\Select\Result\DocumentInterface; use Solarium\QueryType\Select\Result\DocumentInterface;
use Solarium\QueryType\Select\Result\Document as ReadOnlyDocument;
use Solarium\Plugin\BufferedAdd\Event\Events; use Solarium\Plugin\BufferedAdd\Event\Events;
use Solarium\Plugin\BufferedAdd\Event\PreFlush as PreFlushEvent; use Solarium\Plugin\BufferedAdd\Event\PreFlush as PreFlushEvent;
use Solarium\Plugin\BufferedAdd\Event\PostFlush as PostFlushEvent; use Solarium\Plugin\BufferedAdd\Event\PostFlush as PostFlushEvent;
...@@ -134,7 +133,7 @@ class BufferedAdd extends Plugin ...@@ -134,7 +133,7 @@ class BufferedAdd extends Plugin
* Add a document * Add a document
* *
* @param DocumentInterface $document * @param DocumentInterface $document
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function addDocument($document) public function addDocument($document)
{ {
......
...@@ -47,7 +47,7 @@ class Events ...@@ -47,7 +47,7 @@ class Events
/** /**
* This event is called before a buffer flush * This event is called before a buffer flush
* *
* The event listener receives the buffer (array). * The event listener receives the buffer (array) .
* *
* @var string * @var string
*/ */
...@@ -62,11 +62,10 @@ class Events ...@@ -62,11 +62,10 @@ class Events
*/ */
const POST_FLUSH = 'solarium.bufferedAdd.postFlush'; const POST_FLUSH = 'solarium.bufferedAdd.postFlush';
/** /**
* This event is called before a buffer commit * This event is called before a buffer commit
* *
* The event listener receives the buffer (array). * The event listener receives the buffer (array) .
* *
* @var string * @var string
*/ */
......
...@@ -98,7 +98,7 @@ class PreCommit extends Event ...@@ -98,7 +98,7 @@ class PreCommit extends Event
/** /**
* Set the buffer for this event, this way you can alter the buffer before it is committed to Solr * Set the buffer for this event, this way you can alter the buffer before it is committed to Solr
* *
* @param array $buffer * @param array $buffer
* @return void * @return void
*/ */
public function setBuffer($buffer) public function setBuffer($buffer)
......
...@@ -64,9 +64,9 @@ class PreFlush extends Event ...@@ -64,9 +64,9 @@ class PreFlush extends Event
/** /**
* Event constructor * Event constructor
* *
* @param array $buffer * @param array $buffer
* @param boolean $overwrite * @param boolean $overwrite
* @param int $commitWithin * @param int $commitWithin
*/ */
public function __construct($buffer, $overwrite, $commitWithin) public function __construct($buffer, $overwrite, $commitWithin)
{ {
...@@ -88,7 +88,7 @@ class PreFlush extends Event ...@@ -88,7 +88,7 @@ class PreFlush extends Event
/** /**
* Set the buffer for this event, this way you can alter the buffer before it is committed to Solr * Set the buffer for this event, this way you can alter the buffer before it is committed to Solr
* *
* @param array $buffer * @param array $buffer
* @return void * @return void
*/ */
public function setBuffer($buffer) public function setBuffer($buffer)
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
*/ */
namespace Solarium\Plugin\CustomizeRequest; namespace Solarium\Plugin\CustomizeRequest;
use Solarium\Core\Plugin\Plugin; use Solarium\Core\Plugin\Plugin;
use Solarium\Core\Query\Query;
use Solarium\Core\Client\Request; use Solarium\Core\Client\Request;
use Solarium\Exception\InvalidArgumentException; use Solarium\Exception\InvalidArgumentException;
use Solarium\Exception\RuntimeException; use Solarium\Exception\RuntimeException;
...@@ -126,8 +125,8 @@ class CustomizeRequest extends Plugin ...@@ -126,8 +125,8 @@ class CustomizeRequest extends Plugin
* Customization instance wil be created based on the options. * Customization instance wil be created based on the options.
* *
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @param Customization|array $customization * @param Customization|array $customization
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function addCustomization($customization) public function addCustomization($customization)
{ {
......
...@@ -60,7 +60,7 @@ class EndpointFailure extends Event ...@@ -60,7 +60,7 @@ class EndpointFailure extends Event
/** /**
* Constructor * Constructor
* *
* @param Endpoint $endpoint * @param Endpoint $endpoint
* @param HttpException $exception * @param HttpException $exception
*/ */
public function __construct(Endpoint $endpoint, HttpException $exception) public function __construct(Endpoint $endpoint, HttpException $exception)
...@@ -85,5 +85,4 @@ class EndpointFailure extends Event ...@@ -85,5 +85,4 @@ class EndpointFailure extends Event
return $this->exception; return $this->exception;
} }
} }
...@@ -224,9 +224,9 @@ class Loadbalancer extends Plugin ...@@ -224,9 +224,9 @@ class Loadbalancer extends Plugin
* Add an endpoint to the loadbalacing 'pool' * Add an endpoint to the loadbalacing 'pool'
* *
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @param Endpoint|string $endpoint * @param Endpoint|string $endpoint
* @param int $weight Must be a positive number * @param int $weight Must be a positive number
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function addEndpoint($endpoint, $weight = 1) public function addEndpoint($endpoint, $weight = 1)
{ {
...@@ -456,7 +456,7 @@ class Loadbalancer extends Plugin ...@@ -456,7 +456,7 @@ class Loadbalancer extends Plugin
/** /**
* Event hook to adjust client settings just before query execution * Event hook to adjust client settings just before query execution
* *
* @param PreExecuteRequestEvent $event * @param PreExecuteRequestEvent $event
*/ */
public function preExecuteRequest(PreExecuteRequestEvent $event) public function preExecuteRequest(PreExecuteRequestEvent $event)
{ {
......
...@@ -73,7 +73,7 @@ class WeightedRandomChoice ...@@ -73,7 +73,7 @@ class WeightedRandomChoice
* Constructor * Constructor
* *
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @param array $choices * @param array $choices
*/ */
public function __construct($choices) public function __construct($choices)
{ {
...@@ -95,7 +95,7 @@ class WeightedRandomChoice ...@@ -95,7 +95,7 @@ class WeightedRandomChoice
* Get a (weighted) random entry * Get a (weighted) random entry
* *
* @throws RuntimeException * @throws RuntimeException
* @param array $excludes Keys to exclude * @param array $excludes Keys to exclude
* @return string * @return string
*/ */
public function getRandom($excludes = array()) public function getRandom($excludes = array())
...@@ -128,7 +128,7 @@ class WeightedRandomChoice ...@@ -128,7 +128,7 @@ class WeightedRandomChoice
$high = count($this->lookup)-1; $high = count($this->lookup)-1;
$low = 0; $low = 0;
while ( $low < $high ) { while ($low < $high) {
$probe = (int) (($high + $low) / 2); $probe = (int) (($high + $low) / 2);
if ($this->lookup[$probe] < $random) { if ($this->lookup[$probe] < $random) {
$low = $probe + 1; $low = $probe + 1;
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
*/ */
namespace Solarium\Plugin\ParallelExecution\Event; namespace Solarium\Plugin\ParallelExecution\Event;
use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\Event;
use Solarium\QueryType\Update\Result;
/** /**
* ExecuteStart event, see Events for details * ExecuteStart event, see Events for details
......
...@@ -113,7 +113,7 @@ class Document extends Query ...@@ -113,7 +113,7 @@ class Document extends Query
* Add multiple documents * Add multiple documents
* *
* @param DocumentInterface[] $documents * @param DocumentInterface[] $documents
* @return self fluent interface * @return self fluent interface
*/ */
public function addDocuments($documents) public function addDocuments($documents)
{ {
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
* @namespace * @namespace
*/ */
namespace Solarium\QueryType\Analysis\ResponseParser; namespace Solarium\QueryType\Analysis\ResponseParser;
use Solarium\QueryType\Analysis\Result as AnalysisResult;
use Solarium\QueryType\Analysis\Result\ResultList; use Solarium\QueryType\Analysis\Result\ResultList;
/** /**
...@@ -49,8 +48,8 @@ class Document extends Field ...@@ -49,8 +48,8 @@ class Document extends Field
/** /**
* Parse implementation * Parse implementation
* *
* @param array $result * @param array $result
* @param array $data * @param array $data
* @return ResultList[] * @return ResultList[]
*/ */
protected function parseAnalysis($result, $data) protected function parseAnalysis($result, $data)
......
...@@ -73,8 +73,8 @@ class Field extends ResponseParserAbstract implements ResponseParserInterface ...@@ -73,8 +73,8 @@ class Field extends ResponseParserAbstract implements ResponseParserInterface
/** /**
* Parser * Parser
* *
* @param Result $result * @param Result $result
* @param array $data * @param array $data
* @return Types[] * @return Types[]
*/ */
protected function parseAnalysis($result, $data) protected function parseAnalysis($result, $data)
...@@ -91,8 +91,8 @@ class Field extends ResponseParserAbstract implements ResponseParserInterface ...@@ -91,8 +91,8 @@ class Field extends ResponseParserAbstract implements ResponseParserInterface
/** /**
* Parse analysis types and items * Parse analysis types and items
* *
* @param Result $result * @param Result $result
* @param array $typeData * @param array $typeData
* @return Types[] * @return Types[]
*/ */
protected function parseTypes($result, $typeData) protected function parseTypes($result, $typeData)
...@@ -102,8 +102,6 @@ class Field extends ResponseParserAbstract implements ResponseParserInterface ...@@ -102,8 +102,6 @@ class Field extends ResponseParserAbstract implements ResponseParserInterface
$results = array(); $results = array();
foreach ($typeData as $fieldKey => $fieldData) { foreach ($typeData as $fieldKey => $fieldData) {
$types = array(); $types = array();
foreach ($fieldData as $typeKey => $typeData) { foreach ($fieldData as $typeKey => $typeData) {
......
...@@ -131,7 +131,7 @@ class Query extends BaseQuery ...@@ -131,7 +131,7 @@ class Query extends BaseQuery
* The fields in the document are indexed together with the generated * The fields in the document are indexed together with the generated
* fields that Solr extracts from the file. * fields that Solr extracts from the file.
* *
* @param Document $document * @param Document $document
* @return self * @return self
*/ */
public function setDocument($document) public function setDocument($document)
...@@ -152,7 +152,7 @@ class Query extends BaseQuery ...@@ -152,7 +152,7 @@ class Query extends BaseQuery
/** /**
* Set the file to upload and index * Set the file to upload and index
* *
* @param string $filename * @param string $filename
* @return self * @return self
*/ */
public function setFile($filename) public function setFile($filename)
...@@ -173,7 +173,7 @@ class Query extends BaseQuery ...@@ -173,7 +173,7 @@ class Query extends BaseQuery
/** /**
* Set the prefix for fields that are not defined in the schema * Set the prefix for fields that are not defined in the schema
* *
* @param string $uprefix * @param string $uprefix
* @return self * @return self
*/ */
public function setUprefix($uprefix) public function setUprefix($uprefix)
...@@ -195,7 +195,7 @@ class Query extends BaseQuery ...@@ -195,7 +195,7 @@ class Query extends BaseQuery
* Set the field to use if uprefix is not specified and a field cannot be * Set the field to use if uprefix is not specified and a field cannot be
* determined * determined
* *
* @param string $defaultField * @param string $defaultField
* @return self * @return self
*/ */
public function setDefaultField($defaultField) public function setDefaultField($defaultField)
...@@ -218,7 +218,7 @@ class Query extends BaseQuery ...@@ -218,7 +218,7 @@ class Query extends BaseQuery
* Set if all field names should be mapped to lowercase with underscores. * Set if all field names should be mapped to lowercase with underscores.
* For example, Content-Type would be mapped to content_type. * For example, Content-Type would be mapped to content_type.
* *
* @param bool $lowerNames * @param bool $lowerNames
* @return self * @return self
*/ */
public function setLowernames($lowerNames) public function setLowernames($lowerNames)
...@@ -239,7 +239,7 @@ class Query extends BaseQuery ...@@ -239,7 +239,7 @@ class Query extends BaseQuery
/** /**
* Set if the extract should be committed immediately * Set if the extract should be committed immediately
* *
* @param bool $commit * @param bool $commit
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function setCommit($commit) public function setCommit($commit)
...@@ -260,7 +260,7 @@ class Query extends BaseQuery ...@@ -260,7 +260,7 @@ class Query extends BaseQuery
/** /**
* Set milliseconds until extract update is committed. Since Solr 3.4 * Set milliseconds until extract update is committed. Since Solr 3.4
* *
* @param int $commitWithin * @param int $commitWithin
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function setCommitWithin($commitWithin) public function setCommitWithin($commitWithin)
...@@ -284,9 +284,9 @@ class Query extends BaseQuery ...@@ -284,9 +284,9 @@ class Query extends BaseQuery
* Example: fmap.content=text will cause the content field normally * Example: fmap.content=text will cause the content field normally
* generated by Tika to be moved to the "text" field. * generated by Tika to be moved to the "text" field.
* *
* @param string $fromField Original field name * @param string $fromField Original field name
* @param mixed|array $toField New field name * @param mixed|array $toField New field name
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function addFieldMapping($fromField, $toField) public function addFieldMapping($fromField, $toField)
{ {
...@@ -298,8 +298,8 @@ class Query extends BaseQuery ...@@ -298,8 +298,8 @@ class Query extends BaseQuery
/** /**
* Add multiple field name mappings * Add multiple field name mappings
* *
* @param array $mappings Name mapping in the form [$fromField => $toField, ...] * @param array $mappings Name mapping in the form [$fromField => $toField, ...]
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function addFieldMappings($mappings) public function addFieldMappings($mappings)
{ {
...@@ -313,8 +313,8 @@ class Query extends BaseQuery ...@@ -313,8 +313,8 @@ class Query extends BaseQuery
/** /**
* Remove a field name mapping * Remove a field name mapping
* *
* @param string $fromField * @param string $fromField
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function removeFieldMapping($fromField) public function removeFieldMapping($fromField)
{ {
...@@ -333,6 +333,7 @@ class Query extends BaseQuery ...@@ -333,6 +333,7 @@ class Query extends BaseQuery
public function clearFieldMappings() public function clearFieldMappings()
{ {
$this->fieldMappings = array(); $this->fieldMappings = array();
return $this; return $this;
} }
...@@ -349,8 +350,8 @@ class Query extends BaseQuery ...@@ -349,8 +350,8 @@ class Query extends BaseQuery
/** /**
* Set many field name mappings. This overwrites any existing fields. * Set many field name mappings. This overwrites any existing fields.
* *
* @param array $mappings Name mapping in the form [$fromField => $toField, ...] * @param array $mappings Name mapping in the form [$fromField => $toField, ...]
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function setFieldMappings($mappings) public function setFieldMappings($mappings)
{ {
...@@ -398,6 +399,7 @@ class Query extends BaseQuery ...@@ -398,6 +399,7 @@ class Query extends BaseQuery
public function createDocument($fields = array(), $boosts = array()) public function createDocument($fields = array(), $boosts = array())
{ {
$class = $this->getDocumentClass(); $class = $this->getDocumentClass();
return new $class($fields, $boosts); return new $class($fields, $boosts);
} }
......
...@@ -58,7 +58,7 @@ class RequestBuilder extends BaseRequestBuilder ...@@ -58,7 +58,7 @@ class RequestBuilder extends BaseRequestBuilder
/** /**
* Build the request * Build the request
* *
* @param Query $query * @param Query $query
* @return Request * @return Request
*/ */
public function build(QueryInterface $query) public function build(QueryInterface $query)
......
...@@ -183,7 +183,7 @@ class Query extends SelectQuery ...@@ -183,7 +183,7 @@ class Query extends SelectQuery
* Separate multiple fields with commas if you use string input. * Separate multiple fields with commas if you use string input.
* *
* @param string|array $fields * @param string|array $fields
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function setMltFields($fields) public function setMltFields($fields)
{ {
...@@ -381,7 +381,7 @@ class Query extends SelectQuery ...@@ -381,7 +381,7 @@ class Query extends SelectQuery
* Separate multiple fields with commas if you use string input. * Separate multiple fields with commas if you use string input.
* *
* @param string|array $queryFields * @param string|array $queryFields
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function setQueryFields($queryFields) public function setQueryFields($queryFields)
{ {
......
...@@ -82,6 +82,7 @@ abstract class Component extends Configurable ...@@ -82,6 +82,7 @@ abstract class Component extends Configurable
public function setQueryInstance(Query $instance) public function setQueryInstance(Query $instance)
{ {
$this->queryInstance = $instance; $this->queryInstance = $instance;
return $this; return $this;
} }
......
...@@ -122,8 +122,8 @@ class MultiQuery extends Facet ...@@ -122,8 +122,8 @@ class MultiQuery extends Facet
* facetquery instance wil be created based on the options. * facetquery instance wil be created based on the options.
* *
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @param Query|array $facetQuery * @param Query|array $facetQuery
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function addQuery($facetQuery) public function addQuery($facetQuery)
{ {
......
...@@ -271,7 +271,6 @@ class Range extends Facet ...@@ -271,7 +271,6 @@ class Range extends Facet
{ {
$other = $this->getOption('other'); $other = $this->getOption('other');
if ($other === null) $other = array(); if ($other === null) $other = array();
return $other; return $other;
} }
...@@ -303,7 +302,6 @@ class Range extends Facet ...@@ -303,7 +302,6 @@ class Range extends Facet
{ {
$include = $this->getOption('include'); $include = $this->getOption('include');
if ($include === null) $include = array(); if ($include === null) $include = array();
return $include; return $include;
} }
} }
...@@ -280,8 +280,8 @@ class FacetSet extends Component ...@@ -280,8 +280,8 @@ class FacetSet extends Component
* Add a facet * Add a facet
* *
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @param Facet\Facet|array $facet * @param Facet\Facet|array $facet
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function addFacet($facet) public function addFacet($facet)
{ {
...@@ -409,9 +409,9 @@ class FacetSet extends Component ...@@ -409,9 +409,9 @@ class FacetSet extends Component
* after setting the key, by using the addFacet method. * after setting the key, by using the addFacet method.
* *
* @throws OutOfBoundsException * @throws OutOfBoundsException
* @param string $type * @param string $type
* @param array|object|null $options * @param array|object|null $options
* @param boolean $add * @param boolean $add
* @return Facet\Facet * @return Facet\Facet
*/ */
public function createFacet($type, $options = null, $add = true) public function createFacet($type, $options = null, $add = true)
...@@ -441,8 +441,8 @@ class FacetSet extends Component ...@@ -441,8 +441,8 @@ class FacetSet extends Component
/** /**
* Get a facet field instance * Get a facet field instance
* *
* @param mixed $options * @param mixed $options
* @param bool $add * @param bool $add
* @return Facet\Field * @return Facet\Field
*/ */
public function createFacetField($options = null, $add = true) public function createFacetField($options = null, $add = true)
...@@ -453,8 +453,8 @@ class FacetSet extends Component ...@@ -453,8 +453,8 @@ class FacetSet extends Component
/** /**
* Get a facet query instance * Get a facet query instance
* *
* @param mixed $options * @param mixed $options
* @param bool $add * @param bool $add
* @return Facet\Query * @return Facet\Query
*/ */
public function createFacetQuery($options = null, $add = true) public function createFacetQuery($options = null, $add = true)
...@@ -465,8 +465,8 @@ class FacetSet extends Component ...@@ -465,8 +465,8 @@ class FacetSet extends Component
/** /**
* Get a facet multiquery instance * Get a facet multiquery instance
* *
* @param mixed $options * @param mixed $options
* @param bool $add * @param bool $add
* @return Facet\MultiQuery * @return Facet\MultiQuery
*/ */
public function createFacetMultiQuery($options = null, $add = true) public function createFacetMultiQuery($options = null, $add = true)
...@@ -477,8 +477,8 @@ class FacetSet extends Component ...@@ -477,8 +477,8 @@ class FacetSet extends Component
/** /**
* Get a facet range instance * Get a facet range instance
* *
* @param mixed $options * @param mixed $options
* @param bool $add * @param bool $add
* @return Facet\Range * @return Facet\Range
*/ */
public function createFacetRange($options = null, $add = true) public function createFacetRange($options = null, $add = true)
......
...@@ -447,7 +447,7 @@ class Grouping extends Component ...@@ -447,7 +447,7 @@ class Grouping extends Component
* Group based on the unique values of a function query. Only available in Solr 4.0+ * Group based on the unique values of a function query. Only available in Solr 4.0+
* *
* @param string $value * @param string $value
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function setFunction($value) public function setFunction($value)
{ {
...@@ -471,7 +471,7 @@ class Grouping extends Component ...@@ -471,7 +471,7 @@ class Grouping extends Component
* This parameter only is supported on Solr 4.0+ * This parameter only is supported on Solr 4.0+
* *
* @param string $value * @param string $value
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function setFacet($value) public function setFacet($value)
{ {
...@@ -495,7 +495,7 @@ class Grouping extends Component ...@@ -495,7 +495,7 @@ class Grouping extends Component
* The start and rows parameters refer to numbers of documents instead of numbers of groups. * The start and rows parameters refer to numbers of documents instead of numbers of groups.
* *
* @param string $value * @param string $value
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function setFormat($value) public function setFormat($value)
{ {
......
...@@ -139,8 +139,8 @@ class Highlighting extends Component ...@@ -139,8 +139,8 @@ class Highlighting extends Component
* Add a field for highlighting * Add a field for highlighting
* *
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @param string|array|Field $field * @param string|array|Field $field
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function addField($field) public function addField($field)
{ {
...@@ -473,8 +473,8 @@ class Highlighting extends Component ...@@ -473,8 +473,8 @@ class Highlighting extends Component
* *
* Solr option h1.tag.post * Solr option h1.tag.post
* *
* @param string $prefix * @param string $prefix
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function setTagPrefix($prefix) public function setTagPrefix($prefix)
{ {
...@@ -498,8 +498,8 @@ class Highlighting extends Component ...@@ -498,8 +498,8 @@ class Highlighting extends Component
* *
* Solr option h1.tag.post * Solr option h1.tag.post
* *
* @param string $postfix * @param string $postfix
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function setTagPostfix($postfix) public function setTagPostfix($postfix)
{ {
...@@ -518,7 +518,6 @@ class Highlighting extends Component ...@@ -518,7 +518,6 @@ class Highlighting extends Component
return $this->getOption('tagpostfix'); return $this->getOption('tagpostfix');
} }
/** /**
* Set fragmenter option * Set fragmenter option
* *
...@@ -757,8 +756,8 @@ class Highlighting extends Component ...@@ -757,8 +756,8 @@ class Highlighting extends Component
/** /**
* Set MultiValuedSeparatorChar option * Set MultiValuedSeparatorChar option
* *
* @param string $separator * @param string $separator
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function setMultiValuedSeparatorChar($separator) public function setMultiValuedSeparatorChar($separator)
{ {
......
...@@ -88,7 +88,7 @@ class MoreLikeThis extends Component ...@@ -88,7 +88,7 @@ class MoreLikeThis extends Component
* When using string input you can separate multiple fields with commas. * When using string input you can separate multiple fields with commas.
* *
* @param string|array $fields * @param string|array $fields
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function setFields($fields) public function setFields($fields)
{ {
......
...@@ -153,8 +153,8 @@ class Stats extends Component ...@@ -153,8 +153,8 @@ class Stats extends Component
* field instance wil be created based on the options. * field instance wil be created based on the options.
* *
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @param Field|array $field * @param Field|array $field
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function addField($field) public function addField($field)
{ {
......
...@@ -200,6 +200,7 @@ class FilterQuery extends Configurable ...@@ -200,6 +200,7 @@ class FilterQuery extends Configurable
public function clearTags() public function clearTags()
{ {
$this->tags = array(); $this->tags = array();
return $this; return $this;
} }
...@@ -214,6 +215,7 @@ class FilterQuery extends Configurable ...@@ -214,6 +215,7 @@ class FilterQuery extends Configurable
public function setTags($tags) public function setTags($tags)
{ {
$this->clearTags(); $this->clearTags();
return $this->addTags($tags); return $this->addTags($tags);
} }
......
...@@ -642,8 +642,8 @@ class Query extends BaseQuery ...@@ -642,8 +642,8 @@ class Query extends BaseQuery
* filterquery instance wil be created based on the options. * filterquery instance wil be created based on the options.
* *
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @param FilterQuery|array $filterQuery * @param FilterQuery|array $filterQuery
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function addFilterQuery($filterQuery) public function addFilterQuery($filterQuery)
{ {
...@@ -801,9 +801,9 @@ class Query extends BaseQuery ...@@ -801,9 +801,9 @@ class Query extends BaseQuery
* instance if there is no registered component for the given key yet. * instance if there is no registered component for the given key yet.
* *
* @throws OutOfBoundsException * @throws OutOfBoundsException
* @param string $key Use one of the constants * @param string $key Use one of the constants
* @param string $autoload Class to autoload if component needs to be created * @param string $autoload Class to autoload if component needs to be created
* @param array $config Configuration to use for autoload * @param array $config Configuration to use for autoload
* @return object|null * @return object|null
*/ */
public function getComponent($key, $autoload = false, $config = null) public function getComponent($key, $autoload = false, $config = null)
...@@ -834,9 +834,9 @@ class Query extends BaseQuery ...@@ -834,9 +834,9 @@ class Query extends BaseQuery
* *
* This overwrites any existing component registered with the same key. * This overwrites any existing component registered with the same key.
* *
* @param string $key * @param string $key
* @param Component $component * @param Component $component
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function setComponent($key, $component) public function setComponent($key, $component)
{ {
...@@ -1081,6 +1081,7 @@ class Query extends BaseQuery ...@@ -1081,6 +1081,7 @@ class Query extends BaseQuery
public function setTags($tags) public function setTags($tags)
{ {
$this->clearTags(); $this->clearTags();
return $this->addTags($tags); return $this->addTags($tags);
} }
......
...@@ -47,7 +47,7 @@ interface ComponentRequestBuilderInterface ...@@ -47,7 +47,7 @@ interface ComponentRequestBuilderInterface
* Add request settings for the debug component * Add request settings for the debug component
* *
* @param Component $component * @param Component $component
* @param Request $request * @param Request $request
* @return Request * @return Request
*/ */
public function buildComponent($component, $request); public function buildComponent($component, $request);
......
...@@ -56,8 +56,8 @@ class FacetSet extends RequestBuilder implements ComponentRequestBuilderInterfac ...@@ -56,8 +56,8 @@ class FacetSet extends RequestBuilder implements ComponentRequestBuilderInterfac
* Add request settings for FacetSet * Add request settings for FacetSet
* *
* @throws UnexpectedValueException * @throws UnexpectedValueException
* @param FacetsetComponent $component * @param FacetsetComponent $component
* @param Request $request * @param Request $request
* @return Request * @return Request
*/ */
public function buildComponent($component, $request) public function buildComponent($component, $request)
......
...@@ -45,9 +45,9 @@ interface ComponentParserInterface ...@@ -45,9 +45,9 @@ interface ComponentParserInterface
/** /**
* Parse result data into result objects * Parse result data into result objects
* *
* @param Query $query * @param Query $query
* @param object $component * @param object $component
* @param array $data * @param array $data
* @return object|null * @return object|null
*/ */
public function parse($query, $component, $data); public function parse($query, $component, $data);
......
...@@ -55,9 +55,9 @@ class Debug implements ComponentParserInterface ...@@ -55,9 +55,9 @@ class Debug implements ComponentParserInterface
/** /**
* Parse result data into result objects * Parse result data into result objects
* *
* @param Query $query * @param Query $query
* @param DebugComponent $component * @param DebugComponent $component
* @param array $data * @param array $data
* @return Result|null * @return Result|null
*/ */
public function parse($query, $component, $data) public function parse($query, $component, $data)
...@@ -124,7 +124,7 @@ class Debug implements ComponentParserInterface ...@@ -124,7 +124,7 @@ class Debug implements ComponentParserInterface
* *
* Used for explain and explainOther * Used for explain and explainOther
* *
* @param array $data * @param array $data
* @return DocumentSet * @return DocumentSet
*/ */
protected function parseDocumentSet($data) protected function parseDocumentSet($data)
...@@ -158,8 +158,8 @@ class Debug implements ComponentParserInterface ...@@ -158,8 +158,8 @@ class Debug implements ComponentParserInterface
/** /**
* Parse raw timing phase data into a result class * Parse raw timing phase data into a result class
* *
* @param string $name * @param string $name
* @param array $data * @param array $data
* @return TimingPhase * @return TimingPhase
*/ */
protected function parseTimingPhase($name, $data) protected function parseTimingPhase($name, $data)
......
...@@ -61,9 +61,9 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac ...@@ -61,9 +61,9 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac
* Parse result data into result objects * Parse result data into result objects
* *
* @throws RuntimeException * @throws RuntimeException
* @param Query $query * @param Query $query
* @param QueryFacetSet $facetSet * @param QueryFacetSet $facetSet
* @param array $data * @param array $data
* @return ResultFacetSet * @return ResultFacetSet
*/ */
public function parse($query, $facetSet, $data) public function parse($query, $facetSet, $data)
...@@ -109,9 +109,9 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac ...@@ -109,9 +109,9 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac
/** /**
* Add a facet result for a field facet * Add a facet result for a field facet
* *
* @param Query $query * @param Query $query
* @param QueryFacetField $facet * @param QueryFacetField $facet
* @param array $data * @param array $data
* @return ResultFacetField * @return ResultFacetField
*/ */
protected function facetField($query, $facet, $data) protected function facetField($query, $facet, $data)
...@@ -131,7 +131,7 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac ...@@ -131,7 +131,7 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac
* Add a facet result for a facet query * Add a facet result for a facet query
* *
* @param QueryFacetQuery $facet * @param QueryFacetQuery $facet
* @param array $data * @param array $data
* @return ResultFacetQuery * @return ResultFacetQuery
*/ */
protected function facetQuery($facet, $data) protected function facetQuery($facet, $data)
...@@ -149,7 +149,7 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac ...@@ -149,7 +149,7 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac
* Add a facet result for a multiquery facet * Add a facet result for a multiquery facet
* *
* @param QueryFacetMultiQuery $facet * @param QueryFacetMultiQuery $facet
* @param array $data * @param array $data
* @return ResultFacetMultiQuery * @return ResultFacetMultiQuery
*/ */
protected function facetMultiQuery($facet, $data) protected function facetMultiQuery($facet, $data)
...@@ -171,9 +171,9 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac ...@@ -171,9 +171,9 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac
/** /**
* Add a facet result for a range facet * Add a facet result for a range facet
* *
* @param Query $query * @param Query $query
* @param QueryFacetRange $facet * @param QueryFacetRange $facet
* @param array $data * @param array $data
* @return ResultFacetRange * @return ResultFacetRange
*/ */
protected function facetRange($query, $facet, $data) protected function facetRange($query, $facet, $data)
......
...@@ -53,9 +53,9 @@ class Grouping implements ComponentParserInterface ...@@ -53,9 +53,9 @@ class Grouping implements ComponentParserInterface
/** /**
* Parse result data into result objects * Parse result data into result objects
* *
* @param Query $query * @param Query $query
* @param GroupingComponent $grouping * @param GroupingComponent $grouping
* @param array $data * @param array $data
* @return Result * @return Result
*/ */
public function parse($query, $grouping, $data) public function parse($query, $grouping, $data)
......
...@@ -51,9 +51,9 @@ class Highlighting implements ComponentParserInterface ...@@ -51,9 +51,9 @@ class Highlighting implements ComponentParserInterface
/** /**
* Parse result data into result objects * Parse result data into result objects
* *
* @param Query $query * @param Query $query
* @param HighlightingComponent $highlighting * @param HighlightingComponent $highlighting
* @param array $data * @param array $data
* @return HighlightingResult * @return HighlightingResult
*/ */
public function parse($query, $highlighting, $data) public function parse($query, $highlighting, $data)
......
...@@ -51,9 +51,9 @@ class MoreLikeThis implements ComponentParserInterface ...@@ -51,9 +51,9 @@ class MoreLikeThis implements ComponentParserInterface
/** /**
* Parse result data into result objects * Parse result data into result objects
* *
* @param Query $query * @param Query $query
* @param MoreLikeThisComponent $moreLikeThis * @param MoreLikeThisComponent $moreLikeThis
* @param array $data * @param array $data
* @return MoreLikeThis * @return MoreLikeThis
*/ */
public function parse($query, $moreLikeThis, $data) public function parse($query, $moreLikeThis, $data)
......
...@@ -55,9 +55,9 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf ...@@ -55,9 +55,9 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
/** /**
* Parse result data into result objects * Parse result data into result objects
* *
* @param Query $query * @param Query $query
* @param SpellcheckComponent $spellcheck * @param SpellcheckComponent $spellcheck
* @param array $data * @param array $data
* @return Result|null * @return Result|null
*/ */
public function parse($query, $spellcheck, $data) public function parse($query, $spellcheck, $data)
...@@ -84,11 +84,11 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf ...@@ -84,11 +84,11 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
$correctlySpelled = $value; $correctlySpelled = $value;
break; break;
case 'collation': case 'collation':
if(!array_key_exists('collation', $value)){ if (!array_key_exists('collation', $value)) {
foreach($value as $collationValue) { foreach ($value as $collationValue) {
$collations[] = $this->parseCollation($query, $collationValue); $collations[] = $this->parseCollation($query, $collationValue);
} }
}else{ } else {
$collations[] = $this->parseCollation($query, $value); $collations[] = $this->parseCollation($query, $value);
} }
break; break;
...@@ -106,14 +106,13 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf ...@@ -106,14 +106,13 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
/** /**
* Parse collation data into a result object * Parse collation data into a result object
* *
* @param Query $queryObject * @param Query $queryObject
* @param array $values * @param array $values
* @return Collation * @return Collation
*/ */
protected function parseCollation($queryObject, $values) protected function parseCollation($queryObject, $values)
{ {
if (is_string($values)) { if (is_string($values)) {
return new Collation($values, null, array()); return new Collation($values, null, array());
} else { } else {
...@@ -126,7 +125,7 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf ...@@ -126,7 +125,7 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
$values = $this->convertToKeyValueArray($values); $values = $this->convertToKeyValueArray($values);
} }
foreach($values as $key => $value) { foreach ($values as $key => $value) {
switch ($key) { switch ($key) {
case 'collationQuery': case 'collationQuery':
$query = $value; $query = $value;
...@@ -159,8 +158,8 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf ...@@ -159,8 +158,8 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
/** /**
* Parse suggestion data into a result object * Parse suggestion data into a result object
* *
* @param string $key * @param string $key
* @param array $value * @param array $value
* @return Suggestion * @return Suggestion
*/ */
protected function parseSuggestion($key, $value) protected function parseSuggestion($key, $value)
......
...@@ -53,7 +53,7 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt ...@@ -53,7 +53,7 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt
* Get result data for the response * Get result data for the response
* *
* @throws RuntimeException * @throws RuntimeException
* @param Result $result * @param Result $result
* @return array * @return array
*/ */
public function parse($result) public function parse($result)
......
...@@ -72,8 +72,8 @@ class Document extends AbstractDocument implements DocumentInterface ...@@ -72,8 +72,8 @@ class Document extends AbstractDocument implements DocumentInterface
* is a readonly document an exception will be thrown to prevent this. * is a readonly document an exception will be thrown to prevent this.
* *
* @throws RuntimeException * @throws RuntimeException
* @param string $name * @param string $name
* @param string $value * @param string $value
* @return void * @return void
*/ */
public function __set($name, $value) public function __set($name, $value)
......
...@@ -100,7 +100,7 @@ class Query extends BaseQuery ...@@ -100,7 +100,7 @@ class Query extends BaseQuery
* For multiple fields use a comma-separated string or array * For multiple fields use a comma-separated string or array
* *
* @param string|array $value * @param string|array $value
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function setFields($value) public function setFields($value)
{ {
...@@ -121,7 +121,6 @@ class Query extends BaseQuery ...@@ -121,7 +121,6 @@ class Query extends BaseQuery
{ {
$value = $this->getOption('fields'); $value = $this->getOption('fields');
if ($value === null) $value = array(); if ($value === null) $value = array();
return $value; return $value;
} }
...@@ -257,7 +256,7 @@ class Query extends BaseQuery ...@@ -257,7 +256,7 @@ class Query extends BaseQuery
* Use a comma-separated string or array for multiple entries * Use a comma-separated string or array for multiple entries
* *
* @param string|array $value * @param string|array $value
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function setRegexFlags($value) public function setRegexFlags($value)
{ {
...@@ -278,7 +277,6 @@ class Query extends BaseQuery ...@@ -278,7 +277,6 @@ class Query extends BaseQuery
{ {
$value = $this->getOption('regexflags'); $value = $this->getOption('regexflags');
if ($value === null) $value = array(); if ($value === null) $value = array();
return $value; return $value;
} }
......
...@@ -51,7 +51,7 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt ...@@ -51,7 +51,7 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt
/** /**
* Get result data for the response * Get result data for the response
* *
* @param Result $result * @param Result $result
* @return array * @return array
*/ */
public function parse($result) public function parse($result)
......
...@@ -70,8 +70,8 @@ class Add extends Command ...@@ -70,8 +70,8 @@ class Add extends Command
* Add a single document * Add a single document
* *
* @throws RuntimeException * @throws RuntimeException
* @param Document $document * @param Document $document
* @return self Provides fluent interface * @return self Provides fluent interface
*/ */
public function addDocument($document) public function addDocument($document)
{ {
......
...@@ -182,8 +182,8 @@ class Query extends BaseQuery ...@@ -182,8 +182,8 @@ class Query extends BaseQuery
* Create a command instance * Create a command instance
* *
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @param string $type * @param string $type
* @param mixed $options * @param mixed $options
* @return Command * @return Command
*/ */
public function createCommand($type, $options = null) public function createCommand($type, $options = null)
......
...@@ -70,7 +70,7 @@ class RequestBuilder extends BaseRequestBuilder ...@@ -70,7 +70,7 @@ class RequestBuilder extends BaseRequestBuilder
* *
* Each commandtype is delegated to a separate builder method. * Each commandtype is delegated to a separate builder method.
* *
* @param UpdateQuery $query * @param UpdateQuery $query
* @throws RuntimeException * @throws RuntimeException
* @return string * @return string
*/ */
......
...@@ -55,6 +55,7 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt ...@@ -55,6 +55,7 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt
public function parse($result) public function parse($result)
{ {
$data = $result->getData(); $data = $result->getData();
return $this->addHeaderInfo($data, array()); return $this->addHeaderInfo($data, array());
} }
......
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