From ea8b4f45386235e1ad3141078c113e90b0d910cb Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Sat, 29 Dec 2018 18:03:14 +0100 Subject: [PATCH] TASK: Fix / improve some comments * Add missing throws annotation. * Remove useless comments. * Import namespaces used in comments. --- Classes/Configuration/ConfigurationContainer.php | 4 +++- Classes/Connection/Elasticsearch/DocumentFactory.php | 4 ---- Classes/Connection/Elasticsearch/SearchResult.php | 2 ++ Classes/Domain/Search/SearchServiceInterface.php | 4 +++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Classes/Configuration/ConfigurationContainer.php b/Classes/Configuration/ConfigurationContainer.php index a491c30..b213c9b 100644 --- a/Classes/Configuration/ConfigurationContainer.php +++ b/Classes/Configuration/ConfigurationContainer.php @@ -26,7 +26,7 @@ use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; /** * Container of all configurations for extension. - * Always inject this to have a single place for configuration and parsing only once. + * Always inject this to have a single place for configuration. */ class ConfigurationContainer implements ConfigurationContainerInterface { @@ -39,6 +39,8 @@ class ConfigurationContainer implements ConfigurationContainerInterface /** * Inject settings via ConfigurationManager. + * + * @throws NoConfigurationException */ public function injectConfigurationManager(ConfigurationManagerInterface $configurationManager) { diff --git a/Classes/Connection/Elasticsearch/DocumentFactory.php b/Classes/Connection/Elasticsearch/DocumentFactory.php index d570789..9b8fcf0 100644 --- a/Classes/Connection/Elasticsearch/DocumentFactory.php +++ b/Classes/Connection/Elasticsearch/DocumentFactory.php @@ -44,8 +44,6 @@ class DocumentFactory implements Singleton } /** - * Creates document from document. - * * @throws \InvalidArgumentException If no search identifier was provided. */ public function getDocument(string $documentType, array $document): \Elastica\Document @@ -67,8 +65,6 @@ class DocumentFactory implements Singleton } /** - * Creates documents based on documents. - * * @throws \InvalidArgumentException If no search identifier was provided. */ public function getDocuments(string $documentType, array $documents): array diff --git a/Classes/Connection/Elasticsearch/SearchResult.php b/Classes/Connection/Elasticsearch/SearchResult.php index 1704f2d..f178c68 100644 --- a/Classes/Connection/Elasticsearch/SearchResult.php +++ b/Classes/Connection/Elasticsearch/SearchResult.php @@ -21,6 +21,8 @@ namespace Codappix\SearchCore\Connection\Elasticsearch; * 02110-1301, USA. */ +use Codappix\SearchCore\Connection\FacetInterface; +use Codappix\SearchCore\Connection\ResultItemInterface; use Codappix\SearchCore\Connection\SearchRequestInterface; use Codappix\SearchCore\Connection\SearchResultInterface; use Codappix\SearchCore\Domain\Model\QueryResultInterfaceStub; diff --git a/Classes/Domain/Search/SearchServiceInterface.php b/Classes/Domain/Search/SearchServiceInterface.php index fafb06b..977a6f6 100644 --- a/Classes/Domain/Search/SearchServiceInterface.php +++ b/Classes/Domain/Search/SearchServiceInterface.php @@ -29,7 +29,9 @@ use Codappix\SearchCore\Connection\SearchResultInterface; */ interface SearchServiceInterface { - + /** + * Fetches result for provided search request. + */ public function search(SearchRequestInterface $searchRequest): SearchResultInterface; /**