Code Duplication    Length = 13-14 lines in 2 locations

src/Algorithms/Dijkstra.php 2 locations

@@ 120-132 (lines=13) @@
117
        return $this->points;
118
    }
119
120
    private static function validate($relations_array)
121
    {
122
        if (is_array($relations_array)) {
123
            $return = true;
124
            foreach ($relations_array as $relations) {
125
                $return = self::checkPointRelations($relations);
126
            }
127
128
            return $return;
129
        } else {
130
            return false;
131
        }
132
    }
133
134
    private static function checkPointRelations($relations)
135
    {
@@ 134-147 (lines=14) @@
131
        }
132
    }
133
134
    private static function checkPointRelations($relations)
135
    {
136
        if (is_array($relations)) {
137
            $return = true;
138
139
            foreach ($relations as $relation) {
140
                $return = self::checkSingleRelation($relation);
141
            }
142
143
            return $return;
144
        } else {
145
            return false;
146
        }
147
    }
148
149
    private static function checkSingleRelation($relation)
150
    {