Code Duplication    Length = 9-9 lines in 3 locations

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

@@ 237-245 (lines=9) @@
234
     *
235
     * @return array Enriched template parameters used for creating the response
236
     */
237
    public function processDisplayActionParameters($objectType, array $templateParameters = [])
238
    {
239
        $contextArgs = ['controller' => $objectType, 'action' => 'display'];
240
        if (!in_array($objectType, $this->getObjectTypes('controllerAction', $contextArgs))) {
241
            throw new Exception($this->__('Error! Invalid object type received.'));
242
        }
243
    
244
        return $this->addTemplateParameters($objectType, $templateParameters, 'controllerAction', $contextArgs);
245
    }
246
247
    /**
248
     * Processes the parameters for an edit action.
@@ 255-263 (lines=9) @@
252
     *
253
     * @return array Enriched template parameters used for creating the response
254
     */
255
    public function processEditActionParameters($objectType, array $templateParameters = [])
256
    {
257
        $contextArgs = ['controller' => $objectType, 'action' => 'edit'];
258
        if (!in_array($objectType, $this->getObjectTypes('controllerAction', $contextArgs))) {
259
            throw new Exception($this->__('Error! Invalid object type received.'));
260
        }
261
    
262
        return $this->addTemplateParameters($objectType, $templateParameters, 'controllerAction', $contextArgs);
263
    }
264
265
    /**
266
     * Processes the parameters for a delete action.
@@ 273-281 (lines=9) @@
270
     *
271
     * @return array Enriched template parameters used for creating the response
272
     */
273
    public function processDeleteActionParameters($objectType, array $templateParameters = [])
274
    {
275
        $contextArgs = ['controller' => $objectType, 'action' => 'delete'];
276
        if (!in_array($objectType, $this->getObjectTypes('controllerAction', $contextArgs))) {
277
            throw new Exception($this->__('Error! Invalid object type received.'));
278
        }
279
    
280
        return $this->addTemplateParameters($objectType, $templateParameters, 'controllerAction', $contextArgs);
281
    }
282
283
    /**
284
     * Returns an array of additional template variables which are specific to the object type treated by this repository.