Code Duplication    Length = 14-14 lines in 2 locations

Event/Subscriber/ExtraConfigurationSubscriber.php 2 locations

@@ 261-274 (lines=14) @@
258
                ->getParameter('translation')['pattern'];
259
260
            // add a link to the "edit" action, if it is allowed
261
            if (in_array('edit', $allowedActions)) {
262
                $configuration['fields']['_actions']['type'] = 'collection';
263
                $configuration['fields']['_actions']['options']['_edit'] = [
264
                    'type' => 'action',
265
                    'options' => [
266
                        'title' => $this->getTranslationKey($translationPattern, 'edit', $event->getAdmin()->getName()),
267
                        'route' => $event->getAdmin()->generateRouteName('edit'),
268
                        'parameters' => [
269
                            'id' => false
270
                        ],
271
                        'icon' => 'pencil'
272
                    ]
273
                ];
274
            }
275
            // add a link to the "delete" action, if it is allowed
276
            if (in_array('delete', $allowedActions)) {
277
                $configuration['fields']['_actions']['type'] = 'collection';
@@ 276-289 (lines=14) @@
273
                ];
274
            }
275
            // add a link to the "delete" action, if it is allowed
276
            if (in_array('delete', $allowedActions)) {
277
                $configuration['fields']['_actions']['type'] = 'collection';
278
                $configuration['fields']['_actions']['options']['_delete'] = [
279
                    'type' => 'action',
280
                    'options' => [
281
                        'title' => $this->getTranslationKey($translationPattern, 'delete', $event->getAdmin()->getName()),
282
                        'route' => $event->getAdmin()->generateRouteName('delete'),
283
                        'parameters' => [
284
                            'id' => false
285
                        ],
286
                        'icon' => 'remove'
287
                    ]
288
                ];
289
            }
290
        }
291
    }
292
}