Code Duplication    Length = 2-2 lines in 3 locations

src/Query/SelectAbstract.php 3 locations

@@ 60-61 (lines=2) @@
57
	protected function addColumn($expr1, $expr2 = null, $func = null){
58
		// @todo: quotes
59
		switch(true){
60
			case  $expr2 && $func:
61
				$col = sprintf('%s(%s) AS %s', strtoupper($func), $this->quote($expr1), $this->quote($expr2)); break;
62
			case  $expr2 && !$func:
63
				$col = sprintf('%s AS %s', $this->quote($expr1), $this->quote($expr2)); break;
64
			case !$expr2 && $func:
@@ 62-63 (lines=2) @@
59
		switch(true){
60
			case  $expr2 && $func:
61
				$col = sprintf('%s(%s) AS %s', strtoupper($func), $this->quote($expr1), $this->quote($expr2)); break;
62
			case  $expr2 && !$func:
63
				$col = sprintf('%s AS %s', $this->quote($expr1), $this->quote($expr2)); break;
64
			case !$expr2 && $func:
65
				$col = sprintf('%s(%s)', strtoupper($func), $this->quote($expr1)); break;
66
			case !$expr2 && !$func:
@@ 64-65 (lines=2) @@
61
				$col = sprintf('%s(%s) AS %s', strtoupper($func), $this->quote($expr1), $this->quote($expr2)); break;
62
			case  $expr2 && !$func:
63
				$col = sprintf('%s AS %s', $this->quote($expr1), $this->quote($expr2)); break;
64
			case !$expr2 && $func:
65
				$col = sprintf('%s(%s)', strtoupper($func), $this->quote($expr1)); break;
66
			case !$expr2 && !$func:
67
			default:
68
				$col = $this->quote($expr1);