TASK: Fix scurtinizer issues

This commit is contained in:
Daniel Siepmann 2018-03-06 17:58:19 +01:00
parent 560597dcff
commit 8d930448e0
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
5 changed files with 14 additions and 9 deletions

View file

@ -38,6 +38,9 @@ interface SearchRequestInterface extends QueryInterface
public function setFilter(array $filter);
/**
* @return void
*/
public function addFacet(FacetRequestInterface $facet);
/**
@ -48,12 +51,16 @@ interface SearchRequestInterface extends QueryInterface
/**
* Workaround for paginate widget support which will
* use the request to build another search.
*
* @return void
*/
public function setConnection(ConnectionInterface $connection);
/**
* Workaround for paginate widget support which will
* use the request to build another search.
*
* @return void
*/
public function setSearchService(SearchService $searchService);
}

View file

@ -27,7 +27,7 @@ class GeoPointProcessor implements ProcessorInterface
{
public function processData(array $record, array $configuration) : array
{
if (! $this->canApply($record, $configuration)) {
if (! $this->isApplyable($record, $configuration)) {
return $record;
}
@ -39,7 +39,7 @@ class GeoPointProcessor implements ProcessorInterface
return $record;
}
protected function canApply(array $record, array $configuration) : bool
protected function isApplyable(array $record, array $configuration) : bool
{
if (!isset($record[$configuration['lat']])
|| !is_numeric($record[$configuration['lat']])

View file

@ -152,7 +152,7 @@ abstract class AbstractIndexer implements IndexerInterface
',',
$this->configuration->get('indexing.' . $this->identifier . '.abstractFields')
);
if (!$fieldsToUse) {
if ($fieldsToUse === []) {
return;
}
foreach ($fieldsToUse as $fieldToUse) {

View file

@ -104,7 +104,7 @@ class DataHandler implements Singleton
return $this->indexerFactory->getIndexer($table);
}
public function canHandle(string $table) : bool
public function supportsTable(string $table) : bool
{
try {
$this->getIndexer($table);
@ -112,7 +112,5 @@ class DataHandler implements Singleton
} catch (NoMatchingIndexerException $e) {
return false;
}
return false;
}
}

View file

@ -90,8 +90,8 @@ class DataHandler implements Singleton
$uid = key($record);
$fieldData = current($record);
if (isset($fieldArray['uid'])) {
$uid = $fieldArray['uid'];
if (isset($fieldData['uid'])) {
$uid = $fieldData['uid'];
} elseif (isset($dataHandler->substNEWwithIDs[$uid])) {
$uid = $dataHandler->substNEWwithIDs[$uid];
}
@ -123,7 +123,7 @@ class DataHandler implements Singleton
$this->logger->debug('Datahandler could not be setup.');
return false;
}
if (! $this->dataHandler->canHandle($table)) {
if (! $this->dataHandler->supportsTable($table)) {
$this->logger->debug('Table is not allowed.', [$table]);
return false;
}