/** * Sort steps * * @param \XLite\Logic\Import\Step\AStep $a First * @param \XLite\Logic\Import\Step\AStep $b Second * * @return integer */ public function sortSteps(\XLite\Logic\Import\Step\AStep $a, \XLite\Logic\Import\Step\AStep $b) { $aw = $a->getWeight(); $bw = $b->getWeight(); if ($aw > $bw) { $result = 1; } elseif ($aw < $bw) { $result = -1; } else { $result = 0; } return $result; }