Code Duplication    Length = 25-26 lines in 2 locations

DependencyInjection/CrudsEntitiesConfigurator.php 2 locations

@@ 122-146 (lines=25) @@
119
        );
120
    }
121
122
    public function registerReadAction($mount, $name, $path, $repository, $class)
123
    {
124
        $definition = new Definition(ReadController::class);
125
        $definition->setArguments(
126
            [
127
                $repository,
128
                $this->getEvm(),
129
            ]
130
        );
131
132
        $actionName   = 'read';
133
        $controllerId = $this->generateControllerId($name, $actionName);
134
        $this->container->setDefinition($controllerId, $definition);
135
136
        $action = $controllerId.':'.ReadController::ACTION;
137
        $this->registerRoute(
138
            $mount,
139
            $name,
140
            $actionName,
141
            $path,
142
            $action,
143
            ['GET', 'POST'],
144
            ['class' => $class, 'arguments' => ['identifier']]
145
        );
146
    }
147
148
    public function registerUpdateAction($mount, $name, $path, $repository, $processor, $manager, $class)
149
    {
@@ 182-207 (lines=26) @@
179
        );
180
    }
181
182
    public function registerDeleteAction($mount, $name, $path, $repository, $manager, $class)
183
    {
184
        $definition = new Definition(DeleteController::class);
185
        $definition->setArguments(
186
            [
187
                $repository,
188
                $manager,
189
                $this->getEvm(),
190
            ]
191
        );
192
193
        $actionName   = 'delete';
194
        $controllerId = $controllerId = $this->generateControllerId($name, $actionName);
195
        $this->container->setDefinition($controllerId, $definition);
196
197
        $action = $controllerId.':'.DeleteController::ACTION;
198
        $this->registerRoute(
199
            $mount,
200
            $name,
201
            $actionName,
202
            $path,
203
            $action,
204
            ['POST', 'DELETE'],
205
            ['class' => $class, 'arguments' => ['identifier']]
206
        );
207
    }
208
209
    public function registerSearchAction($mount, $name, $path, $class, $repository, $criteria, $count_path, $prefix)
210
    {