Code Duplication    Length = 8-9 lines in 2 locations

src/Output/QRImage.php 2 locations

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