Commit bc946ef5 authored by Dorian Villet's avatar Dorian Villet

Fixing type hints on Document that should hints on DocumentInterface.

parent 0766401c
......@@ -45,7 +45,7 @@ namespace Solarium\QueryType\Extract;
use Solarium\Core\Query\Query as BaseQuery;
use Solarium\Core\Client\Client;
use Solarium\QueryType\Update\ResponseParser as UpdateResponseParser;
use Solarium\QueryType\Update\Query\Document\Document;
use Solarium\QueryType\Update\Query\Document\DocumentInterface;
/**
* Extract query
......@@ -131,7 +131,7 @@ class Query extends BaseQuery
* The fields in the document are indexed together with the generated
* fields that Solr extracts from the file.
*
* @param Document $document
* @param DocumentInterface $document
* @return self
*/
public function setDocument($document)
......@@ -142,7 +142,7 @@ class Query extends BaseQuery
/**
* Get the document with literal fields and boost settings
*
* @return Document|null
* @return DocumentInterface|null
*/
public function getDocument()
{
......@@ -394,7 +394,7 @@ class Query extends BaseQuery
*
* @param array $fields
* @param array $boosts
* @return Document
* @return DocumentInterface
*/
public function createDocument($fields = array(), $boosts = array())
{
......
......@@ -38,7 +38,7 @@
*/
namespace Solarium\QueryType\Update\Query\Command;
use Solarium\QueryType\Update\Query\Query as UpdateQuery;
use Solarium\QueryType\Update\Query\Document\Document;
use Solarium\QueryType\Update\Query\Document\DocumentInterface;
use Solarium\Exception\RuntimeException;
/**
......@@ -70,12 +70,12 @@ class Add extends Command
* Add a single document
*
* @throws RuntimeException
* @param Document $document
* @return self Provides fluent interface
* @param DocumentInterface $document
* @return self Provides fluent interface
*/
public function addDocument($document)
{
if (!($document instanceof Document)) {
if (!($document instanceof DocumentInterface)) {
throw new RuntimeException('Documents must implement the document interface');
}
......@@ -115,7 +115,7 @@ class Add extends Command
/**
* Get all documents
*
* @return Document[]
* @return DocumentInterface[]
*/
public function getDocuments()
{
......
......@@ -349,10 +349,10 @@ class Query extends BaseQuery
* If you need more control, like choosing a key for the command you need to
* create you own command instance and use the add method.
*
* @param Document $document
* @param boolean $overwrite
* @param int $commitWithin
* @return self Provides fluent interface
* @param DocumentInterface $document
* @param boolean $overwrite
* @param int $commitWithin
* @return self Provides fluent interface
*/
public function addDocument($document, $overwrite = null,
$commitWithin = null)
......
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