mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-22 21:16:11 +01:00
Fix CGL issues
Do not introduce unnecessary changes into pull request for TYPO3 CMS 9 update. * Trim trailing whitespace. * Do not introduce blank line before namespace definition with this pull request. * Add posix new line at end of file.
This commit is contained in:
parent
5acdd91865
commit
c940ac4497
7 changed files with 46 additions and 50 deletions
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
namespace Codappix\SearchCore;
|
||||
|
||||
use Codappix\SearchCore\Compatibility\ExtensionConfigurationInterface;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
namespace Codappix\SearchCore\Compatibility;
|
||||
|
||||
use Codappix\SearchCore\Bootstrap;
|
||||
|
@ -9,7 +8,7 @@ class ExtensionConfiguration implements ExtensionConfigurationInterface
|
|||
/**
|
||||
* @return object|\TYPO3\CMS\Core\Configuration\ExtensionConfiguration
|
||||
*/
|
||||
protected function _base()
|
||||
private function base()
|
||||
{
|
||||
return Bootstrap::getObjectManager()->get(\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class);
|
||||
}
|
||||
|
@ -22,6 +21,6 @@ class ExtensionConfiguration implements ExtensionConfigurationInterface
|
|||
*/
|
||||
public function get($extensionKey)
|
||||
{
|
||||
return $this->_base()->get($extensionKey);
|
||||
return $this->base()->get($extensionKey);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
namespace Codappix\SearchCore\Compatibility;
|
||||
|
||||
interface ExtensionConfigurationInterface
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
namespace Codappix\SearchCore\Compatibility;
|
||||
|
||||
/*
|
||||
|
@ -43,7 +42,7 @@ class ImplementationRegistrationService
|
|||
ExtensionConfigurationInterface::class,
|
||||
ExtensionConfiguration::class
|
||||
);
|
||||
} else if (VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 8000000) {
|
||||
} elseif (VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 8000000) {
|
||||
$container->registerImplementation(
|
||||
ExtensionConfigurationInterface::class,
|
||||
Version87\ExtensionConfiguration::class
|
||||
|
|
|
@ -80,12 +80,9 @@ class ConfigurationContainer implements ConfigurationContainerInterface
|
|||
*/
|
||||
public function getIfExists(string $path)
|
||||
{
|
||||
try
|
||||
{
|
||||
try {
|
||||
return ArrayUtility::getValueByPath($this->settings, $path, '.');
|
||||
}
|
||||
catch (\Exception $exception)
|
||||
{
|
||||
} catch (\Exception $exception) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
namespace Codappix\SearchCore\Domain\Index;
|
||||
|
||||
/*
|
||||
|
@ -128,7 +127,6 @@ abstract class AbstractIndexer implements IndexerInterface
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array $record
|
||||
*
|
||||
|
@ -137,12 +135,17 @@ abstract class AbstractIndexer implements IndexerInterface
|
|||
protected function prepareRecord(array &$record)
|
||||
{
|
||||
try {
|
||||
$indexingConfiguration = $this->configuration->getIfExists('indexing.' . $this->identifier . '.dataProcessing');
|
||||
$indexingConfiguration = $this->configuration->getIfExists(
|
||||
'indexing.' . $this->identifier . '.dataProcessing'
|
||||
);
|
||||
|
||||
if (!empty($indexingConfiguration) && is_array($indexingConfiguration)) {
|
||||
foreach ($indexingConfiguration as $configuration) {
|
||||
$record = $this->dataProcessorService->executeDataProcessor($configuration, $record,
|
||||
$this->identifier);
|
||||
$record = $this->dataProcessorService->executeDataProcessor(
|
||||
$configuration,
|
||||
$record,
|
||||
$this->identifier
|
||||
);
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
|
@ -158,7 +161,6 @@ abstract class AbstractIndexer implements IndexerInterface
|
|||
$this->handleAbstract($record);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array $record
|
||||
*
|
||||
|
@ -169,8 +171,9 @@ abstract class AbstractIndexer implements IndexerInterface
|
|||
$record['search_abstract'] = '';
|
||||
|
||||
try {
|
||||
|
||||
$indexConfiguration = $this->configuration->getIfExists('indexing.' . $this->identifier . '.abstractFields');
|
||||
$indexConfiguration = $this->configuration->getIfExists(
|
||||
'indexing.' . $this->identifier . '.abstractFields'
|
||||
);
|
||||
|
||||
$fieldsToUse = GeneralUtility::trimExplode(',', $indexConfiguration);
|
||||
if ($fieldsToUse === []) {
|
||||
|
|
Loading…
Reference in a new issue