Code Duplication    Length = 13-14 lines in 2 locations

src/Algorithms/Dijkstra.php 2 locations

@@ 109-121 (lines=13) @@
106
        return $this->points;
107
    }
108
109
    private static function validate($relations_array)
110
    {
111
        if (is_array($relations_array)) {
112
            $return = true;
113
            foreach ($relations_array as $relations) {
114
                $return = self::checkPointRelations($relations);
115
            }
116
117
            return $return;
118
        } else {
119
            return false;
120
        }
121
    }
122
123
    private static function checkPointRelations($relations)
124
    {
@@ 123-136 (lines=14) @@
120
        }
121
    }
122
123
    private static function checkPointRelations($relations)
124
    {
125
        if (is_array($relations)) {
126
            $return = true;
127
128
            foreach ($relations as $relation) {
129
                $return = self::checkSingleRelation($relation);
130
            }
131
132
            return $return;
133
        } else {
134
            return false;
135
        }
136
    }
137
138
    private static function checkSingleRelation($relation)
139
    {