WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API\Reports

DataStore::sort_intervals() protected WC 1.0

Sorts intervals according to user's request.

They are pre-sorted in SQL, but after adding gaps, they need to be sorted including the added ones.

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

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->sort_intervals( $data, $sort_by, $direction );
$data(stdClass) (required)
Data object, must contain an array under $data->intervals.
$sort_by(string) (required)
Ordering property.
$direction(string) (required)
DESC/ASC.

Code of DataStore::sort_intervals() WC 5.3.0

<?php
protected function sort_intervals( &$data, $sort_by, $direction ) {
	$this->sort_array( $data->intervals, $sort_by, $direction );
}