diff --git a/module/VuFind/src/VuFind/ILS/Logic/AvailabilityStatus.php b/module/VuFind/src/VuFind/ILS/Logic/AvailabilityStatus.php index 1ee722ee374..b5acf31044e 100644 --- a/module/VuFind/src/VuFind/ILS/Logic/AvailabilityStatus.php +++ b/module/VuFind/src/VuFind/ILS/Logic/AvailabilityStatus.php @@ -158,7 +158,7 @@ public function availabilityAsString(): string * * @param AvailabilityStatusInterface $other Other Availability Status * - * @return int + * @return int -1 if $other has lower priority, 0 if same, 1 if higher */ public function compareTo(AvailabilityStatusInterface $other): int { @@ -170,7 +170,7 @@ public function compareTo(AvailabilityStatusInterface $other): int * * @return int */ - protected function getPriority(): int + public function getPriority(): int { switch ($this->availability) { case AvailabilityStatusInterface::STATUS_UNKNOWN: diff --git a/module/VuFind/src/VuFind/ILS/Logic/AvailabilityStatusInterface.php b/module/VuFind/src/VuFind/ILS/Logic/AvailabilityStatusInterface.php index 2c0fea343a8..44d46d9bfb4 100644 --- a/module/VuFind/src/VuFind/ILS/Logic/AvailabilityStatusInterface.php +++ b/module/VuFind/src/VuFind/ILS/Logic/AvailabilityStatusInterface.php @@ -122,4 +122,11 @@ public function availabilityAsString(): string; * @return int */ public function compareTo(AvailabilityStatusInterface $other): int; + + /** + * Get status priority. + * + * @return int + */ + public function getPriority(): int; }