WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API\Reports\Variations\Stats

Controller::set_default_report_data() public WC 1.0

Set the default results to 0 if API returns an empty array

{} It's a method of the class: Controller{}

No Hooks.

Return

Object. Nothing.

Usage

$Controller = new Controller();
$Controller->set_default_report_data( $results );
$results(mixed) (required)
Report data.

Code of Controller::set_default_report_data() WC 5.3.0

<?php
public function set_default_report_data( $results ) {
	if ( empty( $results ) ) {
		$results                       = new \stdClass();
		$results->total                = 0;
		$results->totals               = new \stdClass();
		$results->totals->items_sold   = 0;
		$results->totals->net_revenue  = 0;
		$results->totals->orders_count = 0;
		$results->intervals            = array();
		$results->pages                = 1;
		$results->page_no              = 1;
	}
	return $results;
}