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