Code Duplication    Length = 3-4 lines in 4 locations

src/Http/Traits/FluteRoutesTrait.php 4 locations

@@ 80-82 (lines=3) @@
77
        if (in_array(ControllerUpdateInterface::class, $classInterfaces) === true) {
78
            $group->patch($resourceName . $indexSlug, $handler(JCI::METHOD_UPDATE), $params(JCI::METHOD_UPDATE));
79
        }
80
        if (in_array(ControllerDeleteInterface::class, $classInterfaces) === true) {
81
            $group->delete($resourceName . $indexSlug, $handler(JCI::METHOD_DELETE), $params(JCI::METHOD_DELETE));
82
        }
83
84
        return $group;
85
    }
@@ 121-123 (lines=3) @@
118
        if (in_array(ControllerIndexInterface::class, $classInterfaces) === true) {
119
            $group->get($subUri, $handler(FCI::METHOD_INDEX), $params(FCI::METHOD_INDEX));
120
        }
121
        if (in_array(ControllerInstanceInterface::class, $classInterfaces) === true) {
122
            $group->get($subUri . $createSubUrl, $handler(FCI::METHOD_INSTANCE), $params(FCI::METHOD_INSTANCE));
123
        }
124
        if (in_array(ControllerCreateInterface::class, $classInterfaces) === true) {
125
            $group->post($subUri . $createSubUrl, $handler(FCI::METHOD_CREATE), $params(FCI::METHOD_CREATE));
126
        }
@@ 124-126 (lines=3) @@
121
        if (in_array(ControllerInstanceInterface::class, $classInterfaces) === true) {
122
            $group->get($subUri . $createSubUrl, $handler(FCI::METHOD_INSTANCE), $params(FCI::METHOD_INSTANCE));
123
        }
124
        if (in_array(ControllerCreateInterface::class, $classInterfaces) === true) {
125
            $group->post($subUri . $createSubUrl, $handler(FCI::METHOD_CREATE), $params(FCI::METHOD_CREATE));
126
        }
127
        if (in_array(ControllerReadInterface::class, $classInterfaces) === true) {
128
            $group->get($slugged, $handler(FCI::METHOD_READ), $params(FCI::METHOD_READ));
129
        }
@@ 133-136 (lines=4) @@
130
        if (in_array(ControllerUpdateInterface::class, $classInterfaces) === true) {
131
            $group->post($slugged, $handler(FCI::METHOD_UPDATE), $params(FCI::METHOD_UPDATE));
132
        }
133
        if (in_array(ControllerDeleteInterface::class, $classInterfaces) === true) {
134
            $deleteUri = $slugged . '/' . FCI::METHOD_DELETE;
135
            $group->post($deleteUri, $handler(FCI::METHOD_DELETE), $params(FCI::METHOD_DELETE));
136
        }
137
138
        return $group;
139
    }