Code Duplication    Length = 3-3 lines in 3 locations

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

@@ 634-636 (lines=3) @@
631
					|| $character > 0x7E && $character < 0xA0
632
					|| $character > 0xD7FF && $character < 0xF900
633
				) {
634
					for ($j = $start; $j <= $i; $j++) {
635
						$string .= '%' . strtoupper($bytes[$j]);
636
					}
637
				}
638
				else {
639
					for ($j = $start; $j <= $i; $j++) {
@@ 639-641 (lines=3) @@
636
					}
637
				}
638
				else {
639
					for ($j = $start; $j <= $i; $j++) {
640
						$string .= chr(hexdec($bytes[$j]));
641
					}
642
				}
643
			}
644
		}
@@ 649-651 (lines=3) @@
646
		// If we have any bytes left over they are invalid (i.e., we are
647
		// mid-way through a multi-byte sequence)
648
		if ($remaining) {
649
			for ($j = $start; $j < $len; $j++) {
650
				$string .= '%' . strtoupper($bytes[$j]);
651
			}
652
		}
653
654
		return $string;