Code Duplication    Length = 14-14 lines in 2 locations

Event/Subscriber/ExtraConfigurationSubscriber.php 2 locations

@@ 162-175 (lines=14) @@
159
                ;
160
                
161
                
162
                if (in_array('edit', $allowedActions)) {
163
                    $configuration['fields']['_actions']['type'] = 'collection';
164
                    $configuration['fields']['_actions']['options']['_edit'] = [
165
                        'type' => 'action',
166
                        'options' => [
167
                            'title' => $this->getTranslationKey($translationPattern, 'edit', $event->getAdmin()->getName()),
168
                            'route' => $admin->generateRouteName('edit'),
169
                            'parameters' => [
170
                                'id' => false
171
                            ],
172
                            'icon' => 'pencil'
173
                        ]
174
                    ];
175
                }
176
                if (in_array('delete', $allowedActions)) {
177
                    $configuration['fields']['_actions']['type'] = 'collection';
178
                    $configuration['fields']['_actions']['options']['_delete'] = [
@@ 176-189 (lines=14) @@
173
                        ]
174
                    ];
175
                }
176
                if (in_array('delete', $allowedActions)) {
177
                    $configuration['fields']['_actions']['type'] = 'collection';
178
                    $configuration['fields']['_actions']['options']['_delete'] = [
179
                        'type' => 'action',
180
                        'options' => [
181
                            'title' => $this->getTranslationKey($translationPattern, 'delete', $event->getAdmin()->getName()),
182
                            'route' => $admin->generateRouteName('delete'),
183
                            'parameters' => [
184
                                'id' => false
185
                            ],
186
                            'icon' => 'remove'
187
                        ]
188
                    ];
189
                }
190
            }
191
        }
192
        // reset action configuration