Code Duplication    Length = 6-9 lines in 2 locations

src/Helper/Collector/Base/CoordinateCollector.php 1 location

@@ 184-189 (lines=6) @@
181
            $coordinates = $this->collectValue($map->getCenter(), $coordinates);
182
        }
183
184
        foreach ($this->boundCollector->collect($map) as $bound) {
185
            if ($bound->hasCoordinates()) {
186
                $coordinates = $this->collectValue($bound->getSouthWest(), $coordinates);
187
                $coordinates = $this->collectValue($bound->getNorthEast(), $coordinates);
188
            }
189
        }
190
191
        foreach ($this->circleCollector->collect($map) as $circle) {
192
            $coordinates = $this->collectValue($circle->getCenter(), $coordinates);

src/Helper/Collector/Place/Base/AutocompleteCoordinateCollector.php 1 location

@@ 53-61 (lines=9) @@
50
     */
51
    public function collect(Autocomplete $autocomplete, array $coordinates = [])
52
    {
53
        foreach ($this->boundCollector->collect($autocomplete) as $bound) {
54
            if ($bound->hasSouthWest()) {
55
                $coordinates = $this->collectValue($bound->getSouthWest(), $coordinates);
56
            }
57
58
            if ($bound->hasNorthEast()) {
59
                $coordinates = $this->collectValue($bound->getNorthEast(), $coordinates);
60
            }
61
        }
62
63
        return $coordinates;
64
    }