Code Duplication    Length = 9-9 lines in 2 locations

src/CardinalDirection/CardinalDirectionDistancesCalculator.php 2 locations

@@ 45-53 (lines=9) @@
42
                    ->setEast($point1->getDistance($point3, $distanceCalculator))
43
                    ->setSouth($point3->getDistance($point2, $distanceCalculator));
44
45
            case CardinalDirection::CARDINAL_DIRECTION_SOUTHWEST:
46
                $bounds = new Bounds(
47
                    new Coordinate($point2->getLat(), $point1->getLng()),
48
                    new Coordinate($point1->getLat(), $point2->getLng())
49
                );
50
                $point3 = new Coordinate($bounds->getSouth(), $bounds->getEast());
51
52
                return CardinalDirectionDistances::create()
53
                    ->setNorth($point3->getDistance($point2, $distanceCalculator))
54
                    ->setEast($point1->getDistance($point3, $distanceCalculator));
55
56
            case CardinalDirection::CARDINAL_DIRECTION_NORTHEAST:
@@ 56-64 (lines=9) @@
53
                    ->setNorth($point3->getDistance($point2, $distanceCalculator))
54
                    ->setEast($point1->getDistance($point3, $distanceCalculator));
55
56
            case CardinalDirection::CARDINAL_DIRECTION_NORTHEAST:
57
                $bounds = new Bounds(
58
                    new Coordinate($point1->getLat(), $point2->getLng()),
59
                    new Coordinate($point2->getLat(), $point1->getLng())
60
                );
61
                $point3 = new Coordinate($bounds->getNorth(), $bounds->getWest());
62
63
                return CardinalDirectionDistances::create()
64
                    ->setSouth($point3->getDistance($point2, $distanceCalculator))
65
                    ->setWest($point1->getDistance($point3, $distanceCalculator));
66
67
            case CardinalDirection::CARDINAL_DIRECTION_SOUTHEAST: