for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace HDNET\OnpageIntegration\Provider;
use HDNET\OnpageIntegration\Provider\Configuration;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use HDNET\OnpageIntegration\Service\ArrayService;
class MetaDataProvider
{
/**
* @var Configuration
*/
protected $configurationProvider;
* @var ArrayService
protected $arrayService;
public function __construct()
$this->configurationProvider = GeneralUtility::makeInstance(Configuration::class);
$this->arrayService = GeneralUtility::makeInstance(ArrayService::class);
}
* @param string $key
* @return array
public function getMetaData($key)
$key
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$configData = $this->configurationProvider->getAllConfigurationData();
$searchKeys = ['description', 'priority'];
$elements = $this->arrayService->findElement($configData, 'seoaspects');
return $this->buildData($elements, $searchKeys);
* @param array $array
* @param array $searchKeys
protected function buildData(array $array, array $searchKeys)
$tmp = [];
foreach ($array as $key => $element) {
$tmp[$key] = $this->filter($element, $searchKeys);
return $tmp;
protected function filter(array $array, array $searchKeys)
if (in_array($key, $searchKeys)) {
$tmp[$key] = $element;
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.