/** * @param ServiceDeliveryInterface $a * @param ServiceDeliveryInterface $b * * @return int */ public static function sort(ServiceDeliveryInterface $a, ServiceDeliveryInterface $b) { if ($a->getPriority() === $b->getPriority()) { return 0; } return $a->getPriority() > $b->getPriority() ? -1 : 1; }
/** * {@inheritdoc} */ public function setDeliveryMethod(ServiceDeliveryInterface $method = null) { $this->deliveryMethod = $method; $this->deliveryMethodCode = $method ? $method->getCode() : null; }