Sesha::_rsortByStockID PHP Method

_rsortByStockID() protected method

Comparison function for reverse sorting stock by id.
protected _rsortByStockID ( array $a, array $b ) : integer
$a array Item one.
$b array Item two.
return integer -1 if item one is greater, 1 if item two is greater; 0 if they are equal.
    protected function _rsortByStockID($a, $b)
    {
        if ($a['stock_id'] == $b['stock_id']) {
            return 0;
        }
        return $a['stock_id'] > $b['stock_id'] ? -1 : 1;
    }