Code Duplication    Length = 16-16 lines in 2 locations

src/Event/Subscriber/ExtraConfigurationSubscriber.php 2 locations

@@ 350-365 (lines=16) @@
347
            return;
348
        }
349
350
        if (key_exists('list', $configuration['actions'])) {
351
            // Add a "Create" link in the top bar if the create action is allowed
352
            if (!key_exists('create', $configuration['actions'])) {
353
                return;
354
            }
355
            $configuration['actions']['list']['menus']['top']['items'][] = [
356
                'admin' => $adminName,
357
                'action' => 'create',
358
                'text' => StringUtils::getTranslationKey(
359
                    $this->applicationConfiguration->getParameter('translation_pattern'),
360
                    $adminName,
361
                    'create'
362
                ),
363
                'icon' => 'plus',
364
            ];
365
        }
366
367
        if (key_exists('create', $configuration['actions'])) {
368
            // Add a "Return" link in the top bar if the list action is allowed
@@ 367-382 (lines=16) @@
364
            ];
365
        }
366
367
        if (key_exists('create', $configuration['actions'])) {
368
            // Add a "Return" link in the top bar if the list action is allowed
369
            if (!key_exists('list', $configuration['actions'])) {
370
                return;
371
            }
372
            $configuration['actions']['create']['menus']['top']['items'][] = [
373
                'admin' => $adminName,
374
                'action' => 'list',
375
                'text' => StringUtils::getTranslationKey(
376
                    $this->applicationConfiguration->getParameter('translation_pattern'),
377
                    $adminName,
378
                    'return'
379
                ),
380
                'icon' => 'arrow-left',
381
            ];
382
        }
383
384
        if (key_exists('edit', $configuration['actions'])) {
385
            // Add a "Return" link in the top bar if the list action is allowed