Skip to content

Commit

Permalink
[zen-27][zendframework#1107] Fixes some imports/resolutions of interf…
Browse files Browse the repository at this point in the history
…aces
  • Loading branch information
weierophinney committed May 7, 2012
1 parent 03b99ea commit 92528ee
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 25 deletions.
5 changes: 2 additions & 3 deletions library/Zend/Search/Lucene/Analysis/TokenFilter/LowerCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@

namespace Zend\Search\Lucene\Analysis\TokenFilter;

use Zend\Search\Lucene\Analysis\TokenFilter,
Zend\Search\Lucene\Analysis\Token;
use Zend\Search\Lucene\Analysis\Token;

/**
* Lower case Token filter.
Expand All @@ -33,7 +32,7 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class LowerCase implements TokenFilter
class LowerCase implements TokenFilterInterface
{
/**
* Normalize Token or remove it (if null is returned)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@

namespace Zend\Search\Lucene\Analysis\TokenFilter;

use Zend\Search\Lucene\Analysis\TokenFilter,
Zend\Search\Lucene\Analysis\Token,
use Zend\Search\Lucene\Analysis\Token,
Zend\Search\Lucene,
Zend\Search\Lucene\Exception\ExtensionNotLoadedExtension;

Expand All @@ -35,7 +34,7 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class LowerCaseUtf8 implements TokenFilter
class LowerCaseUtf8 implements TokenFilterInterface
{
/**
* Object constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@

namespace Zend\Search\Lucene\Analysis\TokenFilter;

use Zend\Search\Lucene\Analysis\TokenFilter,
Zend\Search\Lucene\Analysis\Token;
use Zend\Search\Lucene\Analysis\Token;

/**
* Token filter that removes short words. What is short word can be configured with constructor.
Expand All @@ -33,7 +32,7 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class ShortWords implements TokenFilter
class ShortWords implements TokenFilterInterface
{
/**
* Minimum allowed term length
Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Search/Lucene/Analysis/TokenFilter/StopWords.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
*/

namespace Zend\Search\Lucene\Analysis\TokenFilter;

use Zend\Search\Lucene,
Zend\Search\Lucene\Analysis\TokenFilter,
Zend\Search\Lucene\Analysis\Token,
Zend\Search\Lucene\Exception\InvalidArgumentException,
Zend\Search\Lucene\Exception\RuntimeException;
Expand All @@ -38,7 +38,7 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class StopWords implements TokenFilter
class StopWords implements TokenFilterInterface
{
/**
* Stop Words
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Search/Lucene/Document/HTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

use Zend\Search\Lucene\Document,
Zend\Search\Lucene,
Zend\Search\Lucene\Analysis\Analyzer\AnalyzerInterface,
Zend\Search\Lucene\Analysis\Analyzer,
Zend\Search\Lucene\Exception\RuntimeException,
Zend\Search\Lucene\Exception\InvalidArgumentException;

Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Search/Lucene/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ class Index implements SearchIndexInterface
* 0 means pre-2.1 index format
* -1 means there are no segments files.
*
* @param \Zend\Search\Lucene\Storage\Directory $directory
* @param \Zend\Search\Lucene\Storage\Directory\DirectoryInterface $directory
* @throws \Zend\Search\Lucene\Exception\RuntimeException
* @return integer
*/
public static function getActualGeneration(Directory $directory)
public static function getActualGeneration(Directory\DirectoryInterface $directory)
{
/**
* Zend_Search_Lucene uses segments.gen file to retrieve current generation number
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Search/Lucene/LockManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

namespace Zend\Search\Lucene;

use Zend\Search\Lucene\Storage\Directory,
use Zend\Search\Lucene\Storage\Directory\DirectoryInterface as Directory,
Zend\Search\Lucene\Exception\RuntimeException;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@

namespace Zend\Search\Lucene\Search\Highlighter;

use Zend\Search\Lucene\Search\Highlighter,
Zend\Search\Lucene\Document;
use Zend\Search\Lucene\Document;

/**
* @category Zend
Expand All @@ -31,7 +30,7 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class DefaultHighlighter implements Highlighter
class DefaultHighlighter implements HighlighterInterface
{
/**
* List of colors for text highlighting
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Search/Lucene/Search/QueryParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
namespace Zend\Search\Lucene\Search;

use Zend\Search\Lucene,
Zend\Search\Lucene\Analysis\Analyzer\AnalyzerInterface,
Zend\Search\Lucene\Analysis\Analyzer,
Zend\Search\Lucene\Index,
Zend\Search\Lucene\Search\Exception\QueryParserException,
Zend\Search\Lucene\Exception\RuntimeException;
Expand Down
8 changes: 4 additions & 4 deletions library/Zend/Search/Lucene/SearchIndexInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ interface SearchIndexInterface extends Index\TermsStreamInterface
* 0 means pre-2.1 index format
* -1 means there are no segments files.
*
* @param \Zend\Search\Lucene\Storage\Directory $directory
* @param \Zend\Search\Lucene\Storage\Directory\DirectoryInterface $directory
* @return integer
* @throws \Zend\Search\Lucene\Exception\ExceptionInterface
*/
public static function getActualGeneration(Storage\Directory $directory);
public static function getActualGeneration(Storage\Directory\DirectoryInterface $directory);

/**
* Get segments file name
Expand All @@ -66,9 +66,9 @@ public function getFormatVersion();
public function setFormatVersion($formatVersion);

/**
* Returns the Zend_Search_Lucene_Storage_Directory instance for this index.
* Returns the Zend\Search\Lucene\Storage\Directory\DirectoryInterface instance for this index.
*
* @return \Zend\Search\Lucene\Storage\Directory
* @return \Zend\Search\Lucene\Storage\Directory\DirectoryInterface
*/
public function getDirectory();

Expand Down
5 changes: 3 additions & 2 deletions tests/Zend/Search/Lucene/AnalysisTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
*/

namespace ZendTest\Search\Lucene;
use Zend\Search\Lucene\Analysis\AnalyzerInterface;
use Zend\Search\Lucene\Analysis\Analyzer\Analyzer;
use Zend\Search\Lucene\Analysis\Analyzer\AnalyzerInterface;
use Zend\Search\Lucene\Analysis\Analyzer\Common;
use Zend\Search\Lucene\Analysis\Analyzer\Common\Text;
use Zend\Search\Lucene\Analysis\Analyzer\Common\TextNum;
Expand All @@ -47,7 +48,7 @@ class AnalysisTest extends \PHPUnit_Framework_TestCase
{
public function testAnalyzer()
{
$currentAnalyzer = Analyzer\Analyzer::getDefault();
$currentAnalyzer = Analyzer::getDefault();
$this->assertTrue($currentAnalyzer instanceof AnalyzerInterface);

/** Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8Num */
Expand Down

0 comments on commit 92528ee

Please sign in to comment.