Code Duplication    Length = 11-11 lines in 2 locations

includes/api/class-give-api.php 2 locations

@@ 1989-1999 (lines=11) @@
1986
	 * @since  1.1
1987
	 * @return array default sales statistics
1988
	 */
1989
	private function get_default_sales_stats() {
1990
1991
		// Default sales return
1992
		$donations                               = array();
1993
		$donations['donations']['today']         = $this->stats->get_sales( 0, 'today' );
1994
		$donations['donations']['current_month'] = $this->stats->get_sales( 0, 'this_month' );
1995
		$donations['donations']['last_month']    = $this->stats->get_sales( 0, 'last_month' );
1996
		$donations['donations']['totals']        = give_get_total_donations();
1997
1998
		return $donations;
1999
	}
2000
2001
	/**
2002
	 * Generate the default earnings stats returned by the 'stats' endpoint
@@ 2008-2018 (lines=11) @@
2005
	 * @since  1.1
2006
	 * @return array default earnings statistics
2007
	 */
2008
	private function get_default_earnings_stats() {
2009
2010
		// Default earnings return
2011
		$earnings                              = array();
2012
		$earnings['earnings']['today']         = $this->stats->get_earnings( 0, 'today' );
2013
		$earnings['earnings']['current_month'] = $this->stats->get_earnings( 0, 'this_month' );
2014
		$earnings['earnings']['last_month']    = $this->stats->get_earnings( 0, 'last_month' );
2015
		$earnings['earnings']['totals']        = give_get_total_earnings();
2016
2017
		return $earnings;
2018
	}
2019
2020
	/**
2021
	 * API Key Backwards Compatibility