Code Duplication    Length = 12-12 lines in 2 locations

src/Http/Traits/FluteRoutesTrait.php 2 locations

@@ 176-187 (lines=12) @@
173
     *
174
     * @return GroupInterface
175
     */
176
    protected static function addInRelationship(
177
        GroupInterface $group,
178
        string $resourceName,
179
        string $relationshipName,
180
        string $controllerClass,
181
        string $addMethod
182
    ): GroupInterface {
183
        $url = $resourceName . '/{' . JCI::ROUTE_KEY_INDEX . '}/' .
184
            DocumentInterface::KEYWORD_RELATIONSHIPS . '/' . $relationshipName;
185
186
        return $group->post($url, [$controllerClass, $addMethod]);
187
    }
188
189
    /**
190
     * @param GroupInterface $group
@@ 198-209 (lines=12) @@
195
     *
196
     * @return GroupInterface
197
     */
198
    protected static function removeInRelationship(
199
        GroupInterface $group,
200
        string $resourceName,
201
        string $relationshipName,
202
        string $controllerClass,
203
        string $deleteMethod
204
    ): GroupInterface {
205
        $url = $resourceName . '/{' . JCI::ROUTE_KEY_INDEX . '}/' .
206
            DocumentInterface::KEYWORD_RELATIONSHIPS . '/' . $relationshipName;
207
208
        return $group->delete($url, [$controllerClass, $deleteMethod]);
209
    }
210
211
    /**
212
     * @param string $prefix