for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* TcaService.
*/
namespace HDNET\Focuspoint\Service;
use HDNET\Focuspoint\Domain\Repository\DimensionRepository;
use TYPO3\CMS\Core\Utility\GeneralUtility;
class TcaService extends AbstractService
{
* Add the custom elements.
*
* @param array $params
* @param object $parent
public function addDatabaseItems(array &$params, $parent)
$parent
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$customItems = $this->getCustomItems();
if (empty($customItems)) {
\array_unshift($params['items'], [
'',
]);
return;
}
// Add element
foreach ($customItems as $item) {
$item['dimension'] . ' / ' . $item['title'],
$item['identifier'],
'Custom',
'--div--',
* Get custom elements.
* @return array
protected function getCustomItems(): array
return GeneralUtility::makeInstance(DimensionRepository::class)->findAll();
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.