Code Duplication    Length = 8-8 lines in 3 locations

htdocs/class/libraries/vendor/smottt/wideimage/lib/WideImage/Image.php 3 locations

@@ 243-250 (lines=8) @@
240
	 * @param int $B If $R is int, this is the blue component
241
	 * @return int Image color index
242
	 */
243
	public function allocateColor($R, $G = null, $B = null)
244
	{
245
		if (is_array($R)) {
246
			return imageColorAllocate($this->handle, $R['red'], $R['green'], $R['blue']);
247
		}
248
		
249
		return imageColorAllocate($this->handle, $R, $G, $B);
250
	}
251
	
252
	/**
253
	 * @return bool True if the image is transparent, false otherwise
@@ 366-373 (lines=8) @@
363
	 * @param int $B Blue component (or null if $R is an RGB array)
364
	 * @return int Color index
365
	 */
366
	public function getClosestColor($R, $G = null, $B = null)
367
	{
368
		if (is_array($R)) {
369
			return imagecolorclosest($this->handle, $R['red'], $R['green'], $R['blue']);
370
		}
371
		
372
		return imagecolorclosest($this->handle, $R, $G, $B);
373
	}
374
	
375
	/**
376
	 * Returns the color index that exactly matches the given RGB value. Uses
@@ 384-391 (lines=8) @@
381
	 * @param int $B Blue component (or null if $R is an RGB array)
382
	 * @return int Color index
383
	 */
384
	public function getExactColor($R, $G = null, $B = null)
385
	{
386
		if (is_array($R)) {
387
			return imagecolorexact($this->handle, $R['red'], $R['green'], $R['blue']);
388
		}
389
		
390
		return imagecolorexact($this->handle, $R, $G, $B);
391
	}
392
	
393
	/**
394
	 * Copies transparency information from $sourceImage. Optionally fills