Skip to content

[Backport] Fix docBlock for hasInvoices(), hasShipments(), hasCreditmemos() #16923

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/code/Magento/Sales/Model/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -1770,7 +1770,7 @@ public function getTracksCollection()
*/
public function hasInvoices()
{
return $this->getInvoiceCollection()->count();
return boolval($this->getInvoiceCollection()->count());
}

/**
Expand All @@ -1780,7 +1780,7 @@ public function hasInvoices()
*/
public function hasShipments()
{
return $this->getShipmentsCollection()->count();
return boolval($this->getShipmentsCollection()->count());
}

/**
Expand All @@ -1790,7 +1790,7 @@ public function hasShipments()
*/
public function hasCreditmemos()
{
return $this->getCreditmemosCollection()->count();
return boolval($this->getCreditmemosCollection()->count());
}

/**
Expand Down