Code Duplication    Length = 8-9 lines in 2 locations

src/Output/QRImage.php 2 locations

@@ 75-83 (lines=9) @@
72
		ob_start();
73
74
		switch($this->options->type){
75
			case QRCode::OUTPUT_IMAGE_JPG:
76
				imagejpeg(
77
					$image,
78
					$this->options->cachefile,
79
					in_array($this->options->jpegQuality, range(0, 100), true)
80
						? $this->options->jpegQuality
81
						: 85
82
				);
83
				break;
84
			case QRCode::OUTPUT_IMAGE_GIF: /** Actually, it's pronounced "DJIFF". *hides* */
85
				imagegif(
86
					$image,
@@ 91-98 (lines=8) @@
88
				);
89
				break;
90
			case QRCode::OUTPUT_IMAGE_PNG:
91
			default:
92
				imagepng(
93
					$image,
94
					$this->options->cachefile,
95
					in_array($this->options->pngCompression, range(-1, 9), true)
96
						? $this->options->pngCompression
97
						: -1
98
				);
99
		}
100
101
		$imageData = ob_get_contents();