Piwik\Plugin\ReportsProvider::sort PHP Method

sort() private method

API metadata are sorted by category/name, with a little tweak to replicate the standard Piwik category ordering
private sort ( Report $a, Report $b ) : integer
$a Report
$b Report
return integer
    private function sort($a, $b)
    {
        return $this->compareCategories($a->getCategoryId(), $a->getSubcategoryId(), $a->getOrder(), $b->getCategoryId(), $b->getSubcategoryId(), $b->getOrder());
    }