WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API\Reports

Segmenter::segment_cmp() private WC 1.0

Compares two report data objects by pre-defined object property and ASC/DESC ordering.

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

No Hooks.

Return

String. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->segment_cmp( $a, $b );
$a(stdClass) (required)
Object a.
$b(stdClass) (required)
Object b.

Code of Segmenter::segment_cmp() WC 5.3.0

<?php
private function segment_cmp( $a, $b ) {
	if ( $a['segment_id'] === $b['segment_id'] ) {
		return 0;
	} elseif ( $a['segment_id'] > $b['segment_id'] ) {
		return 1;
	} elseif ( $a['segment_id'] < $b['segment_id'] ) {
		return - 1;
	}
}