TASK: Fix PR issues

This commit is contained in:
Daniel Siepmann 2017-10-24 14:06:56 +02:00
parent aebe58721d
commit 7ca998c03a
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
7 changed files with 8 additions and 11 deletions

View file

@ -44,7 +44,7 @@ class CopyToProcessor implements ProcessorInterface
{ {
foreach ($from as $property => $value) { foreach ($from as $property => $value) {
if (is_array($value)) { if (is_array($value)) {
$this->addArray($to, $value, $exclude); $this->addArray($to, $value);
continue; continue;
} }

View file

@ -22,8 +22,6 @@ namespace Codappix\SearchCore\Domain\Index;
use Codappix\SearchCore\Configuration\ConfigurationContainerInterface; use Codappix\SearchCore\Configuration\ConfigurationContainerInterface;
use Codappix\SearchCore\Configuration\InvalidArgumentException; use Codappix\SearchCore\Configuration\InvalidArgumentException;
use Codappix\SearchCore\Domain\Index\IndexerInterface;
use Codappix\SearchCore\Domain\Index\TcaIndexer;
use Codappix\SearchCore\Domain\Index\TcaIndexer\TcaTableService; use Codappix\SearchCore\Domain\Index\TcaIndexer\TcaTableService;
use TYPO3\CMS\Core\SingletonInterface as Singleton; use TYPO3\CMS\Core\SingletonInterface as Singleton;
use TYPO3\CMS\Extbase\Object\ObjectManagerInterface; use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;

View file

@ -72,14 +72,16 @@ class PagesIndexer extends TcaIndexer
} }
$content = $this->fetchContentForPage($record['uid']); $content = $this->fetchContentForPage($record['uid']);
$record['content'] = $content['content']; if ($content !== []) {
$record['media'] = array_unique(array_merge($record['media'], $content['images'])); $record['content'] = $content['content'];
$record['media'] = array_unique(array_merge($record['media'], $content['images']));
}
parent::prepareRecord($record); parent::prepareRecord($record);
} }
/** /**
* @param int $uid * @param int $uid
* @return string * @return []
*/ */
protected function fetchContentForPage($uid) protected function fetchContentForPage($uid)
{ {
@ -92,7 +94,7 @@ class PagesIndexer extends TcaIndexer
if ($contentElements === null) { if ($contentElements === null) {
$this->logger->debug('No content for page ' . $uid); $this->logger->debug('No content for page ' . $uid);
return ''; return [];
} }
$this->logger->debug('Fetched content for page ' . $uid); $this->logger->debug('Fetched content for page ' . $uid);

View file

@ -117,7 +117,7 @@ class RelationResolver implements Singleton
} }
/** /**
* @param array Column config. * @param array $config Column config.
* @return bool * @return bool
*/ */
protected function isRelation(array &$config) protected function isRelation(array &$config)

View file

@ -22,7 +22,6 @@ namespace Codappix\SearchCore\Domain\Search;
use Codappix\SearchCore\Configuration\ConfigurationContainerInterface; use Codappix\SearchCore\Configuration\ConfigurationContainerInterface;
use Codappix\SearchCore\Configuration\InvalidArgumentException; use Codappix\SearchCore\Configuration\InvalidArgumentException;
use Codappix\SearchCore\Connection\ConnectionInterface;
use Codappix\SearchCore\Connection\Elasticsearch\Query; use Codappix\SearchCore\Connection\Elasticsearch\Query;
use Codappix\SearchCore\Connection\SearchRequestInterface; use Codappix\SearchCore\Connection\SearchRequestInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\GeneralUtility;

View file

@ -23,7 +23,6 @@ namespace Codappix\SearchCore\Domain\Service;
use Codappix\SearchCore\Configuration\ConfigurationContainerInterface; use Codappix\SearchCore\Configuration\ConfigurationContainerInterface;
use Codappix\SearchCore\Domain\Index\IndexerFactory; use Codappix\SearchCore\Domain\Index\IndexerFactory;
use Codappix\SearchCore\Domain\Index\NoMatchingIndexerException; use Codappix\SearchCore\Domain\Index\NoMatchingIndexerException;
use Codappix\SearchCore\Domain\Index\TcaIndexer;
use TYPO3\CMS\Core\SingletonInterface as Singleton; use TYPO3\CMS\Core\SingletonInterface as Singleton;
use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\GeneralUtility;

View file

@ -21,7 +21,6 @@ namespace Codappix\SearchCore\Hook;
*/ */
use Codappix\SearchCore\Configuration\NoConfigurationException; use Codappix\SearchCore\Configuration\NoConfigurationException;
use Codappix\SearchCore\Domain\Index\NoMatchingIndexerException;
use Codappix\SearchCore\Domain\Service\DataHandler as OwnDataHandler; use Codappix\SearchCore\Domain\Service\DataHandler as OwnDataHandler;
use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\DataHandling\DataHandler as CoreDataHandler; use TYPO3\CMS\Core\DataHandling\DataHandler as CoreDataHandler;