Code Duplication    Length = 11-11 lines in 2 locations

src/Reverse.php 1 location

@@ 122-132 (lines=11) @@
119
	 * @return maxh\Nominatim\Reverse
120
	 * @throws maxh\Nominatim\Exceptions\InvalidParameterException  if polygon format is not supported
121
	 */
122
	public function polygon($polygon)
123
	{
124
		if(in_array($polygon, $this->polygon))
125
		{
126
			$this->query['polygon_'.$polygon] = "1";
127
128
			return $this;
129
		}
130
131
		throw new InvalidParameterException("This polygon format is not supported");
132
	}
133
134
135
}

src/Search.php 1 location

@@ 237-247 (lines=11) @@
234
	 * @return maxh\Nominatim\Reverse
235
	 * @throws maxh\Nominatim\Exceptions\InvalidParameterException  if polygon format is not supported
236
	 */
237
	public function polygon($polygon)
238
	{
239
		if(in_array($polygon, $this->polygon))
240
		{
241
			$this->query['polygon_'.$polygon] = "1";
242
243
			return $this;
244
		}
245
246
		throw new InvalidParameterException("This polygon format is not supported");
247
	}
248
249
250
}