mirror of
https://github.com/Codappix/search_core.git
synced 2024-12-23 12:16:09 +01:00
TASK: Fix phpdocs and type hints
This commit is contained in:
parent
30a34c4f15
commit
2c6521a565
12 changed files with 21 additions and 42 deletions
|
@ -68,7 +68,7 @@ class IndexFactory implements Singleton
|
|||
*/
|
||||
public function getIndexName(): string
|
||||
{
|
||||
return (string)$this->configuration->get('connections.elasticsearch.index');
|
||||
return $this->configuration->get('connections.elasticsearch.index');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -50,7 +50,7 @@ class MappingFactory implements Singleton
|
|||
* @param string $documentType
|
||||
* @return \Elastica\Type\Mapping
|
||||
*/
|
||||
public function getMapping(\Elastica\Type $type, $documentType = null): \Elastica\Type\Mapping
|
||||
public function getMapping(\Elastica\Type $type, string $documentType = null): \Elastica\Type\Mapping
|
||||
{
|
||||
$mapping = new \Elastica\Type\Mapping();
|
||||
$mapping->setType($type);
|
||||
|
|
|
@ -58,6 +58,7 @@ class TcaRelationResolvingProcessor implements ProcessorInterface
|
|||
* @param array $record
|
||||
* @param array $configuration
|
||||
* @return array
|
||||
* @throws \InvalidArgumentException If _table is not configured.
|
||||
*/
|
||||
public function processData(array $record, array $configuration): array
|
||||
{
|
||||
|
|
|
@ -145,7 +145,7 @@ abstract class AbstractIndexer implements IndexerInterface
|
|||
/**
|
||||
* @return \Generator
|
||||
*/
|
||||
protected function getRecordGenerator()
|
||||
protected function getRecordGenerator(): \Generator
|
||||
{
|
||||
$offset = 0;
|
||||
$limit = $this->getLimit();
|
||||
|
|
|
@ -75,7 +75,7 @@ class IndexerFactory implements Singleton
|
|||
/**
|
||||
* @param string $indexerClass
|
||||
* @param string $identifier
|
||||
* @return \Codappix\SearchCore\Domain\Index\IndexerInterface
|
||||
* @return IndexerInterface
|
||||
* @throws NoMatchingIndexerException
|
||||
*/
|
||||
protected function buildIndexer(string $indexerClass, string $identifier): IndexerInterface
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
namespace Codappix\SearchCore\Domain\Model;
|
||||
|
||||
use Codappix\SearchCore\Connection\ResultItemInterface;
|
||||
|
||||
/*
|
||||
* Copyright (C) 2017 Daniel Siepmann <coding@daniel-siepmann.de>
|
||||
*
|
||||
|
@ -23,6 +21,8 @@ use Codappix\SearchCore\Connection\ResultItemInterface;
|
|||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
use Codappix\SearchCore\Connection\ResultItemInterface;
|
||||
|
||||
class ResultItem implements ResultItemInterface
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -24,6 +24,7 @@ namespace Codappix\SearchCore\Domain\Model;
|
|||
use Codappix\SearchCore\Connection\ConnectionInterface;
|
||||
use Codappix\SearchCore\Connection\FacetRequestInterface;
|
||||
use Codappix\SearchCore\Connection\SearchRequestInterface;
|
||||
use Codappix\SearchCore\Connection\SearchResultInterface;
|
||||
use Codappix\SearchCore\Domain\Search\SearchService;
|
||||
use Codappix\SearchCore\Utility\ArrayUtility as CustomArrayUtility;
|
||||
use TYPO3\CMS\Core\Utility\ArrayUtility;
|
||||
|
@ -158,12 +159,12 @@ class SearchRequest implements SearchRequestInterface
|
|||
$this->searchService = $searchService;
|
||||
}
|
||||
|
||||
// Extbase QueryInterface
|
||||
// Current implementation covers only paginate widget support.
|
||||
|
||||
/**
|
||||
* Extbase QueryInterface
|
||||
* Current implementation covers only paginate widget support.
|
||||
*
|
||||
* @param bool $returnRawQueryResult
|
||||
* @return array|\Codappix\SearchCore\Connection\SearchResultInterface|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
|
||||
* @return SearchResultInterface
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function execute($returnRawQueryResult = false)
|
||||
|
@ -223,7 +224,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function getSource()
|
||||
|
@ -233,7 +233,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
|
||||
/**
|
||||
* @param array $orderings
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\QueryInterface|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function setOrderings(array $orderings)
|
||||
|
@ -243,7 +242,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
|
||||
/**
|
||||
* @param \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface $constraint
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\QueryInterface|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function matching($constraint)
|
||||
|
@ -253,7 +251,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
|
||||
/**
|
||||
* @param mixed $constraint1
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\AndInterface|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function logicalAnd($constraint1)
|
||||
|
@ -263,7 +260,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
|
||||
/**
|
||||
* @param mixed $constraint1
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\OrInterface|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function logicalOr($constraint1)
|
||||
|
@ -273,7 +269,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
|
||||
/**
|
||||
* @param \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface $constraint
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\NotInterface|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function logicalNot(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface $constraint)
|
||||
|
@ -285,7 +280,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
* @param string $propertyName
|
||||
* @param mixed $operand
|
||||
* @param bool $caseSensitive
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function equals($propertyName, $operand, $caseSensitive = true)
|
||||
|
@ -297,7 +291,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
* @param string $propertyName
|
||||
* @param string $operand
|
||||
* @param bool $caseSensitive
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function like($propertyName, $operand, $caseSensitive = true)
|
||||
|
@ -308,7 +301,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
/**
|
||||
* @param string $propertyName
|
||||
* @param mixed $operand
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function contains($propertyName, $operand)
|
||||
|
@ -319,7 +311,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
/**
|
||||
* @param string $propertyName
|
||||
* @param mixed $operand
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function in($propertyName, $operand)
|
||||
|
@ -330,7 +321,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
/**
|
||||
* @param string $propertyName
|
||||
* @param mixed $operand
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function lessThan($propertyName, $operand)
|
||||
|
@ -341,7 +331,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
/**
|
||||
* @param string $propertyName
|
||||
* @param mixed $operand
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function lessThanOrEqual($propertyName, $operand)
|
||||
|
@ -352,7 +341,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
/**
|
||||
* @param string $propertyName
|
||||
* @param mixed $operand
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function greaterThan($propertyName, $operand)
|
||||
|
@ -363,7 +351,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
/**
|
||||
* @param string $propertyName
|
||||
* @param mixed $operand
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function greaterThanOrEqual($propertyName, $operand)
|
||||
|
@ -372,7 +359,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* @return string|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function getType()
|
||||
|
@ -390,7 +376,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function getQuerySettings()
|
||||
|
@ -399,7 +384,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* @return integer|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function count()
|
||||
|
@ -408,7 +392,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* @return array|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function getOrderings()
|
||||
|
@ -417,7 +400,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* @return null|\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function getConstraint()
|
||||
|
@ -427,7 +409,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
|
||||
/**
|
||||
* @param string $propertyName
|
||||
* @return bool|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function isEmpty($propertyName)
|
||||
|
@ -445,7 +426,6 @@ class SearchRequest implements SearchRequestInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\Statement|void
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function getStatement()
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace Codappix\SearchCore\Domain\Model;
|
|||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
use Codappix\SearchCore\Connection\ResultItemInterface;
|
||||
use Codappix\SearchCore\Connection\SearchResultInterface;
|
||||
|
||||
/**
|
||||
|
|
|
@ -22,11 +22,12 @@ namespace Codappix\SearchCore\Hook;
|
|||
*/
|
||||
|
||||
use Codappix\SearchCore\Configuration\NoConfigurationException;
|
||||
use Codappix\SearchCore\Domain\Index\NoMatchingIndexerException;
|
||||
use Codappix\SearchCore\Domain\Service\DataHandler as OwnDataHandler;
|
||||
use TYPO3\CMS\Backend\Utility\BackendUtility;
|
||||
use TYPO3\CMS\Core\DataHandling\DataHandler as CoreDataHandler;
|
||||
use TYPO3\CMS\Core\Log\Logger;
|
||||
use TYPO3\CMS\Core\Log\LogManager;
|
||||
use TYPO3\CMS\Core\Log\Logger;
|
||||
use TYPO3\CMS\Core\SingletonInterface as Singleton;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Object\ObjectManager;
|
||||
|
@ -93,7 +94,7 @@ class DataHandler implements Singleton
|
|||
/**
|
||||
* @param CoreDataHandler $dataHandler
|
||||
* @return void
|
||||
* @throws \Codappix\SearchCore\Domain\Index\NoMatchingIndexerException
|
||||
* @throws NoMatchingIndexerException
|
||||
*/
|
||||
public function processDatamap_afterAllOperations(CoreDataHandler $dataHandler)
|
||||
{
|
||||
|
@ -119,7 +120,7 @@ class DataHandler implements Singleton
|
|||
* @param array $parameters
|
||||
* @param CoreDataHandler $dataHandler
|
||||
* @return void
|
||||
* @throws \Codappix\SearchCore\Domain\Index\NoMatchingIndexerException
|
||||
* @throws NoMatchingIndexerException
|
||||
*/
|
||||
public function clearCachePostProc(array $parameters, CoreDataHandler $dataHandler)
|
||||
{
|
||||
|
@ -143,7 +144,7 @@ class DataHandler implements Singleton
|
|||
* @param string $table
|
||||
* @param integer $uid
|
||||
* @return bool
|
||||
* @throws \Codappix\SearchCore\Domain\Index\NoMatchingIndexerException
|
||||
* @throws NoMatchingIndexerException
|
||||
*/
|
||||
protected function processRecord(string $table, int $uid): bool
|
||||
{
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace Codappix\SearchCore\Integration\Form\Finisher;
|
|||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
use Codappix\SearchCore\Domain\Index\NoMatchingIndexerException;
|
||||
use TYPO3\CMS\Form\Domain\Finishers\AbstractFinisher;
|
||||
use TYPO3\CMS\Form\Domain\Finishers\Exception\FinisherException;
|
||||
|
||||
|
@ -48,9 +49,9 @@ class DataHandlerFinisher extends AbstractFinisher
|
|||
];
|
||||
|
||||
/**
|
||||
* @return null|string|void
|
||||
* @return void
|
||||
* @throws FinisherException
|
||||
* @throws \Codappix\SearchCore\Domain\Index\NoMatchingIndexerException
|
||||
* @throws NoMatchingIndexerException
|
||||
*/
|
||||
protected function executeInternal()
|
||||
{
|
||||
|
|
|
@ -36,9 +36,6 @@ abstract class AbstractDataHandlerTest extends AbstractFunctionalTestCase
|
|||
*/
|
||||
protected $subject;
|
||||
|
||||
/**
|
||||
* @throws \Doctrine\DBAL\DBALException
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
|
|
@ -67,8 +67,6 @@ class PagesIndexerTest extends AbstractFunctionalTestCase
|
|||
* @test
|
||||
* @dataProvider rootLineDataSets
|
||||
* @param string $dataSetPath
|
||||
* @throws \Codappix\SearchCore\Domain\Index\NoMatchingIndexerException
|
||||
* @throws \TYPO3\TestingFramework\Core\Exception
|
||||
*/
|
||||
public function rootLineIsRespectedDuringIndexing($dataSetPath)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue