Skip to content

Commit

Permalink
Add public method AvailabilityStatusInterface::getPriority.
Browse files Browse the repository at this point in the history
  • Loading branch information
EreMaijala committed Aug 22, 2024
1 parent d942971 commit 5efa34f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/VuFind/src/VuFind/ILS/Logic/AvailabilityStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 5efa34f

Please sign in to comment.