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:
Daniel Siepmann 2019-05-05 09:53:00 +02:00
parent 5acdd91865
commit c940ac4497
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
7 changed files with 46 additions and 50 deletions

View file

@ -1,5 +1,4 @@
<?php <?php
namespace Codappix\SearchCore; namespace Codappix\SearchCore;
use Codappix\SearchCore\Compatibility\ExtensionConfigurationInterface; use Codappix\SearchCore\Compatibility\ExtensionConfigurationInterface;

View file

@ -1,5 +1,4 @@
<?php <?php
namespace Codappix\SearchCore\Compatibility; namespace Codappix\SearchCore\Compatibility;
use Codappix\SearchCore\Bootstrap; use Codappix\SearchCore\Bootstrap;
@ -9,7 +8,7 @@ class ExtensionConfiguration implements ExtensionConfigurationInterface
/** /**
* @return object|\TYPO3\CMS\Core\Configuration\ExtensionConfiguration * @return object|\TYPO3\CMS\Core\Configuration\ExtensionConfiguration
*/ */
protected function _base() private function base()
{ {
return Bootstrap::getObjectManager()->get(\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class); return Bootstrap::getObjectManager()->get(\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class);
} }
@ -22,6 +21,6 @@ class ExtensionConfiguration implements ExtensionConfigurationInterface
*/ */
public function get($extensionKey) public function get($extensionKey)
{ {
return $this->_base()->get($extensionKey); return $this->base()->get($extensionKey);
} }
} }

View file

@ -1,5 +1,4 @@
<?php <?php
namespace Codappix\SearchCore\Compatibility; namespace Codappix\SearchCore\Compatibility;
interface ExtensionConfigurationInterface interface ExtensionConfigurationInterface

View file

@ -1,5 +1,4 @@
<?php <?php
namespace Codappix\SearchCore\Compatibility; namespace Codappix\SearchCore\Compatibility;
/* /*
@ -43,7 +42,7 @@ class ImplementationRegistrationService
ExtensionConfigurationInterface::class, ExtensionConfigurationInterface::class,
ExtensionConfiguration::class ExtensionConfiguration::class
); );
} else if (VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 8000000) { } elseif (VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 8000000) {
$container->registerImplementation( $container->registerImplementation(
ExtensionConfigurationInterface::class, ExtensionConfigurationInterface::class,
Version87\ExtensionConfiguration::class Version87\ExtensionConfiguration::class

View file

@ -80,12 +80,9 @@ class ConfigurationContainer implements ConfigurationContainerInterface
*/ */
public function getIfExists(string $path) public function getIfExists(string $path)
{ {
try try {
{
return ArrayUtility::getValueByPath($this->settings, $path, '.'); return ArrayUtility::getValueByPath($this->settings, $path, '.');
} } catch (\Exception $exception) {
catch (\Exception $exception)
{
return null; return null;
} }
} }

View file

@ -1,5 +1,4 @@
<?php <?php
namespace Codappix\SearchCore\Domain\Index; namespace Codappix\SearchCore\Domain\Index;
/* /*
@ -128,7 +127,6 @@ abstract class AbstractIndexer implements IndexerInterface
} }
} }
/** /**
* @param array $record * @param array $record
* *
@ -137,12 +135,17 @@ abstract class AbstractIndexer implements IndexerInterface
protected function prepareRecord(array &$record) protected function prepareRecord(array &$record)
{ {
try { try {
$indexingConfiguration = $this->configuration->getIfExists('indexing.' . $this->identifier . '.dataProcessing'); $indexingConfiguration = $this->configuration->getIfExists(
'indexing.' . $this->identifier . '.dataProcessing'
);
if (!empty($indexingConfiguration) && is_array($indexingConfiguration)) { if (!empty($indexingConfiguration) && is_array($indexingConfiguration)) {
foreach ($indexingConfiguration as $configuration) { foreach ($indexingConfiguration as $configuration) {
$record = $this->dataProcessorService->executeDataProcessor($configuration, $record, $record = $this->dataProcessorService->executeDataProcessor(
$this->identifier); $configuration,
$record,
$this->identifier
);
} }
} }
} catch (\Exception $e) { } catch (\Exception $e) {
@ -158,7 +161,6 @@ abstract class AbstractIndexer implements IndexerInterface
$this->handleAbstract($record); $this->handleAbstract($record);
} }
/** /**
* @param array $record * @param array $record
* *
@ -169,8 +171,9 @@ abstract class AbstractIndexer implements IndexerInterface
$record['search_abstract'] = ''; $record['search_abstract'] = '';
try { try {
$indexConfiguration = $this->configuration->getIfExists(
$indexConfiguration = $this->configuration->getIfExists('indexing.' . $this->identifier . '.abstractFields'); 'indexing.' . $this->identifier . '.abstractFields'
);
$fieldsToUse = GeneralUtility::trimExplode(',', $indexConfiguration); $fieldsToUse = GeneralUtility::trimExplode(',', $indexConfiguration);
if ($fieldsToUse === []) { if ($fieldsToUse === []) {