WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API\Reports

DataStore::sort_array() protected WC 1.0

Sorts array of arrays based on subarray key $sort_by.

{} 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_array( $arr, $sort_by, $direction );
$arr(array) (required)
Array to sort.
$sort_by(string) (required)
Ordering property.
$direction(string) (required)
DESC/ASC.

Code of DataStore::sort_array() WC 5.3.0

<?php
protected function sort_array( &$arr, $sort_by, $direction ) {
	$this->order_by = $this->normalize_order_by( $sort_by );
	$this->order    = $direction;
	usort( $arr, array( $this, 'interval_cmp' ) );
}