Code Duplication    Length = 8-9 lines in 2 locations

module/Geo/src/Geo/Form/GeoSelectHydratorStrategy.php 1 location

@@ 91-99 (lines=9) @@
88
     *
89
     * @return mixed Returns the value that should be hydrated.
90
     */
91
    public function hydrate($value, $data = [])
92
    {
93
        if (empty($value) || 0 !== strpos($value, '{')) {
94
            return null;
95
        }
96
97
        $location = $this->getLocationEntity();
98
        return $location->fromString($value);
99
    }
100
}

module/Geo/src/Geo/Form/GeoSelectSimple.php 1 location

@@ 78-85 (lines=8) @@
75
            },
76
77
            /* hydrate */
78
            function ($value) {
79
                if (empty($value) || 0 !== strpos($value, '{')) {
80
                    return null;
81
                }
82
83
                $location = new Location();
84
                return $location->fromString($value);
85
            }
86
        );
87
    }
88
}