Code Duplication    Length = 10-11 lines in 3 locations

library/Requests/IRI.php 3 locations

@@ 843-853 (lines=11) @@
840
	 * @param string $iuserinfo
841
	 * @return bool
842
	 */
843
	protected function set_userinfo($iuserinfo) {
844
		if ($iuserinfo === null) {
845
			$this->iuserinfo = null;
846
		}
847
		else {
848
			$this->iuserinfo = $this->replace_invalid_with_pct_encoding($iuserinfo, '!$&\'()*+,;=:');
849
			$this->scheme_normalization();
850
		}
851
852
		return true;
853
	}
854
855
	/**
856
	 * Set the ihost. Returns true on success, false on failure (if there are
@@ 959-968 (lines=10) @@
956
	 * @param string $iquery
957
	 * @return bool
958
	 */
959
	protected function set_query($iquery) {
960
		if ($iquery === null) {
961
			$this->iquery = null;
962
		}
963
		else {
964
			$this->iquery = $this->replace_invalid_with_pct_encoding($iquery, '!$&\'()*+,;=:@/?', true);
965
			$this->scheme_normalization();
966
		}
967
		return true;
968
	}
969
970
	/**
971
	 * Set the ifragment.
@@ 976-985 (lines=10) @@
973
	 * @param string $ifragment
974
	 * @return bool
975
	 */
976
	protected function set_fragment($ifragment) {
977
		if ($ifragment === null) {
978
			$this->ifragment = null;
979
		}
980
		else {
981
			$this->ifragment = $this->replace_invalid_with_pct_encoding($ifragment, '!$&\'()*+,;=:@/?');
982
			$this->scheme_normalization();
983
		}
984
		return true;
985
	}
986
987
	/**
988
	 * Convert an IRI to a URI (or parts thereof)