Code Duplication    Length = 10-11 lines in 3 locations

plugin/buycourses/src/Requests/IRI.php 3 locations

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