Skip to content

Commit fa6e2f1

Browse files
committed
Change hasInvoices(), hasShipments(), hasCreditmemos() to return boolean value
1 parent 3a4a238 commit fa6e2f1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,31 +1783,31 @@ public function getTracksCollection()
17831783
/**
17841784
* Check order invoices availability
17851785
*
1786-
* @return int
1786+
* @return bool
17871787
*/
17881788
public function hasInvoices()
17891789
{
1790-
return $this->getInvoiceCollection()->count();
1790+
return boolval($this->getInvoiceCollection()->count());
17911791
}
17921792

17931793
/**
17941794
* Check order shipments availability
17951795
*
1796-
* @return int
1796+
* @return bool
17971797
*/
17981798
public function hasShipments()
17991799
{
1800-
return $this->getShipmentsCollection()->count();
1800+
return boolval($this->getShipmentsCollection()->count());
18011801
}
18021802

18031803
/**
18041804
* Check order creditmemos availability
18051805
*
1806-
* @return int
1806+
* @return bool
18071807
*/
18081808
public function hasCreditmemos()
18091809
{
1810-
return $this->getCreditmemosCollection()->count();
1810+
return boolval($this->getCreditmemosCollection()->count());
18111811
}
18121812

18131813
/**

0 commit comments

Comments
 (0)