Code Duplication    Length = 16-16 lines in 2 locations

src/Event/Subscriber/ExtraConfigurationSubscriber.php 2 locations

@@ 196-211 (lines=16) @@
193
            return;
194
        }
195
196
        if (key_exists('list', $configuration['actions'])) {
197
            // Add a "Create" link in the top bar if the create action is allowed
198
            if (!key_exists('create', $configuration['actions'])) {
199
                return;
200
            }
201
            $configuration['actions']['list']['menus']['top']['items'][] = [
202
                'admin' => $adminName,
203
                'action' => 'create',
204
                'text' => StringUtils::getTranslationKey(
205
                    $this->applicationConfiguration->getParameter('translation_pattern'),
206
                    $adminName,
207
                    'create'
208
                ),
209
                'icon' => 'plus',
210
            ];
211
        }
212
213
        if (key_exists('create', $configuration['actions'])) {
214
            // Add a "Return" link in the top bar if the list action is allowed
@@ 213-228 (lines=16) @@
210
            ];
211
        }
212
213
        if (key_exists('create', $configuration['actions'])) {
214
            // Add a "Return" link in the top bar if the list action is allowed
215
            if (!key_exists('list', $configuration['actions'])) {
216
                return;
217
            }
218
            $configuration['actions']['create']['menus']['top']['items'][] = [
219
                'admin' => $adminName,
220
                'action' => 'list',
221
                'text' => StringUtils::getTranslationKey(
222
                    $this->applicationConfiguration->getParameter('translation_pattern'),
223
                    $adminName,
224
                    'return'
225
                ),
226
                'icon' => 'arrow-left',
227
            ];
228
        }
229
230
        if (key_exists('edit', $configuration['actions'])) {
231
            // Add a "Return" link in the top bar if the list action is allowed