Code Duplication    Length = 15-15 lines in 2 locations

src/system/RoutesModule/Helper/Base/AbstractControllerHelper.php 2 locations

@@ 377-391 (lines=15) @@
374
     *
375
     * @return array Enriched template parameters used for creating the response
376
     */
377
    public function processEditActionParameters($objectType, array $templateParameters = [])
378
    {
379
        $contextArgs = ['controller' => $objectType, 'action' => 'edit'];
380
        if (!in_array($objectType, $this->getObjectTypes('controllerAction', $contextArgs))) {
381
            throw new Exception($this->__('Error! Invalid object type received.'));
382
        }
383
    
384
        $repository = $this->entityFactory->getRepository($objectType);
385
        $repository->setRequest($this->request);
386
    
387
        $additionalParameters = $repository->getAdditionalTemplateParameters('controllerAction', $contextArgs);
388
        $templateParameters = array_merge($templateParameters, $additionalParameters);
389
    
390
        return $templateParameters;
391
    }
392
393
    /**
394
     * Processes the parameters for a delete action.
@@ 401-415 (lines=15) @@
398
     *
399
     * @return array Enriched template parameters used for creating the response
400
     */
401
    public function processDeleteActionParameters($objectType, array $templateParameters = [])
402
    {
403
        $contextArgs = ['controller' => $objectType, 'action' => 'delete'];
404
        if (!in_array($objectType, $this->getObjectTypes('controllerAction', $contextArgs))) {
405
            throw new Exception($this->__('Error! Invalid object type received.'));
406
        }
407
    
408
        $repository = $this->entityFactory->getRepository($objectType);
409
        $repository->setRequest($this->request);
410
    
411
        $additionalParameters = $repository->getAdditionalTemplateParameters('controllerAction', $contextArgs);
412
        $templateParameters = array_merge($templateParameters, $additionalParameters);
413
    
414
        return $templateParameters;
415
    }
416
}
417