Skip to content

Commit c785afb

Browse files
author
Reindert
authored
Set (bool) before function
1 parent a3fe637 commit c785afb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/code/Magento/Sales/Model/Order.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,17 +1774,17 @@ public function getTracksCollection()
17741774
*/
17751775
public function hasInvoices()
17761776
{
1777-
return $this->getInvoiceCollection()->count();
1777+
return (bool)$this->getInvoiceCollection()->count();
17781778
}
17791779

17801780
/**
17811781
* Check order shipments availability
17821782
*
1783-
* @return int
1783+
* @return bool
17841784
*/
17851785
public function hasShipments()
17861786
{
1787-
return $this->getShipmentsCollection()->count();
1787+
return (bool)$this->getShipmentsCollection()->count();
17881788
}
17891789

17901790
/**
@@ -1794,7 +1794,7 @@ public function hasShipments()
17941794
*/
17951795
public function hasCreditmemos()
17961796
{
1797-
return $this->getCreditmemosCollection()->count();
1797+
return (bool)$this->getCreditmemosCollection()->count();
17981798
}
17991799

18001800
/**

0 commit comments

Comments
 (0)