Code Duplication    Length = 12-12 lines in 2 locations

src/Cornford/Googlmapper/MapperBase.php 2 locations

@@ 821-832 (lines=12) @@
818
	 *
819
	 * @return void
820
	 */
821
	public function setRegion($value)
822
	{
823
		if (!is_string($value)) {
824
			throw new MapperArgumentException('Invalid map region.');
825
		}
826
827
		if (!in_array($value, $this->regions)) {
828
			throw new MapperArgumentException('Region is required in ISO 3166-1 code format.');
829
		}
830
831
		$this->region = $value;
832
	}
833
834
	/**
835
	 * Get the Google Maps region.
@@ 853-864 (lines=12) @@
850
	 *
851
	 * @return void
852
	 */
853
	public function setLanguage($value)
854
	{
855
		if (!is_string($value)) {
856
			throw new MapperArgumentException('Invalid map language.');
857
		}
858
859
		if (!in_array($value, $this->languages)) {
860
			throw new MapperArgumentException('Language is required in ISO 639-1 code format.');
861
		}
862
863
		$this->language = $value;
864
	}
865
866
	/**
867
	 * Get the Google Maps language.