Code Duplication    Length = 12-12 lines in 2 locations

src/Http/Traits/FluteRoutesTrait.php 2 locations

@@ 169-180 (lines=12) @@
166
     *
167
     * @return GroupInterface
168
     */
169
    protected static function addInRelationship(
170
        GroupInterface $group,
171
        string $resourceName,
172
        string $relationshipName,
173
        string $controllerClass,
174
        string $addMethod
175
    ): GroupInterface {
176
        $url = $resourceName . '/{' . JCI::ROUTE_KEY_INDEX . '}/' .
177
            DocumentInterface::KEYWORD_RELATIONSHIPS . '/' . $relationshipName;
178
179
        return $group->post($url, [$controllerClass, $addMethod]);
180
    }
181
182
    /**
183
     * @param GroupInterface $group
@@ 191-202 (lines=12) @@
188
     *
189
     * @return GroupInterface
190
     */
191
    protected static function removeInRelationship(
192
        GroupInterface $group,
193
        string $resourceName,
194
        string $relationshipName,
195
        string $controllerClass,
196
        string $deleteMethod
197
    ): GroupInterface {
198
        $url = $resourceName . '/{' . JCI::ROUTE_KEY_INDEX . '}/' .
199
            DocumentInterface::KEYWORD_RELATIONSHIPS . '/' . $relationshipName;
200
201
        return $group->delete($url, [$controllerClass, $deleteMethod]);
202
    }
203
204
    /**
205
     * @param string $prefix