Code Duplication    Length = 6-6 lines in 2 locations

src/PowerRoute.php 2 locations

@@ 100-105 (lines=6) @@
97
        if (!$route[ConfigOptions::CONFIG_NODE_CONDITION]) {
98
            return true;
99
        }
100
        if (isset($route[ConfigOptions::CONFIG_NODE_CONDITION][ConfigOptions::CONFIG_NODE_CONDITION_ALL])) {
101
            return $this->getConditionsMatcher(self::CONDITIONS_MATCHER_ALL)->matches(
102
                $route[ConfigOptions::CONFIG_NODE_CONDITION][ConfigOptions::CONFIG_NODE_CONDITION_ALL],
103
                $request
104
            );
105
        }
106
        if (isset($route[ConfigOptions::CONFIG_NODE_CONDITION][ConfigOptions::CONFIG_NODE_CONDITION_ONE])) {
107
            return $this->getConditionsMatcher(self::CONDITIONS_MATCHER_ONE)->matches(
108
                $route[ConfigOptions::CONFIG_NODE_CONDITION][ConfigOptions::CONFIG_NODE_CONDITION_ONE],
@@ 106-111 (lines=6) @@
103
                $request
104
            );
105
        }
106
        if (isset($route[ConfigOptions::CONFIG_NODE_CONDITION][ConfigOptions::CONFIG_NODE_CONDITION_ONE])) {
107
            return $this->getConditionsMatcher(self::CONDITIONS_MATCHER_ONE)->matches(
108
                $route[ConfigOptions::CONFIG_NODE_CONDITION][ConfigOptions::CONFIG_NODE_CONDITION_ONE],
109
                $request
110
            );
111
        }
112
113
        throw new \RuntimeException('Invalid condition specified for route: ' . $route);
114
    }