Function resolveHelperFunction
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
protected function resolveHelperFunction($function): callable
{
Method resolveHelperFunction
has 39 lines of code (exceeds 25 allowed). Consider refactoring.
protected function resolveHelperFunction($function): callable
{
Method validateConfiguration
has 30 lines of code (exceeds 25 allowed). Consider refactoring.
private function validateConfiguration(array $configuration): void
{
if (!isset($configuration['controller']) || (string)$configuration['controller'] === '') {
throw new \InvalidArgumentException(
\sprintf('An extbase controller must be configured for the "%s" compatibility layer.', self::TYPE),
Method getConfigTreeBuilder
has 29 lines of code (exceeds 25 allowed). Consider refactoring.
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('handlebars');
$rootNode = $treeBuilder->getRootNode();
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring.
CacheInterface $cache,
EventDispatcherInterface $eventDispatcher,
TemplateResolverInterface $templateResolver,
TemplateResolverInterface $partialResolver = null,
array $defaultData = []
Function resolveTemplatePath
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
public function resolveTemplatePath(string $templatePath): string
{
$filename = $templatePath;
foreach (array_reverse($this->templateRootPaths) as $templateRootPath) {
foreach ($this->supportedFileExtensions as $extension) {
Function process
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
public function process(ContainerBuilder $container): void
{
$container->registerForAutoconfiguration(DataProcessorInterface::class)->addTag($this->processorTagName);
foreach ($container->findTaggedServiceIds($this->processorTagName) as $id => $tags) {
Function validateConfiguration
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
private function validateConfiguration(array $configuration): void
{
if (!isset($configuration['controller']) || (string)$configuration['controller'] === '') {
throw new \InvalidArgumentException(
\sprintf('An extbase controller must be configured for the "%s" compatibility layer.', self::TYPE),
Avoid too many return
statements within this method.
return $callable;