Code Duplication    Length = 7-7 lines in 2 locations

src/controllers/Resource.php 2 locations

@@ 322-328 (lines=7) @@
319
320
        $allowedVerbs = ['options' => 'OPTIONS'];
321
        foreach ($verbs as $action => $defaultVerbs) {
322
            if (in_array($action, $recordActions)) {
323
                $allowedVerbs[$action] = $recordVerbs;
324
            } elseif (in_array($action, $collectionActions)) {
325
                $allowedVerbs[$action] = $collectionVerbs;
326
            } else {
327
                $allowedVerbs[$action] = $defaultVerbs;
328
            }
329
        }
330
331
        foreach (self::DEFAULT_REST_ACTIONS as $action) {
@@ 332-338 (lines=7) @@
329
        }
330
331
        foreach (self::DEFAULT_REST_ACTIONS as $action) {
332
            if (!isset($allowedVerbs[$action])) {
333
                if (in_array($action, $recordActions)) {
334
                    $allowedVerbs[$action] = $recordVerbs;
335
                } elseif (in_array($action, $collectionActions)) {
336
                    $allowedVerbs[$action] = $collectionVerbs;
337
                }
338
            }
339
        }
340
341
        return $allowedVerbs;