public function sum($expression, $types = [])
    {
        $returnType = 'float';
        if (current($types) === 'integer') {
            $returnType = 'integer';
        }

        return $this->_literalArgumentFunction('SUM', $expression, $types, $returnType);
    }
public function sum($expression, $types = [])
    {
        $returnType = 'float';
        if (current($types) === 'integer') {
            $returnType = 'integer';
        }

        return $this->_literalArgumentFunction('SUM', $expression, $types, $returnType);
    }
public function sum ( $ expression , $ types = [ ] ) { $ returnType = 'float' ; if ( current ( $ types ) === 'integer' ) { $ returnType = 'integer' ; } return $ this -> _literalArgumentFunction ( 'SUM' , $ expression , $ types , $ returnType ) ; }
Returns a FunctionExpression representing a call to SQL SUM function.

@param mixed $expression the function argument
@param array $types list of types to bind to the arguments
@return \Cake\Database\Expression\FunctionExpression
Returns a FunctionExpression representing a call to SQL SUM function .