Skip to content

Commit 8e8bcfa

Browse files
nuzileduard13
authored andcommitted
Change hasInvoices(), hasShipments(), hasCreditmemos() to return boolean value
1 parent cf759ec commit 8e8bcfa

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
@@ -1766,31 +1766,31 @@ public function getTracksCollection()
17661766
/**
17671767
* Check order invoices availability
17681768
*
1769-
* @return int
1769+
* @return bool
17701770
*/
17711771
public function hasInvoices()
17721772
{
1773-
return $this->getInvoiceCollection()->count();
1773+
return boolval($this->getInvoiceCollection()->count());
17741774
}
17751775

17761776
/**
17771777
* Check order shipments availability
17781778
*
1779-
* @return int
1779+
* @return bool
17801780
*/
17811781
public function hasShipments()
17821782
{
1783-
return $this->getShipmentsCollection()->count();
1783+
return boolval($this->getShipmentsCollection()->count());
17841784
}
17851785

17861786
/**
17871787
* Check order creditmemos availability
17881788
*
1789-
* @return int
1789+
* @return bool
17901790
*/
17911791
public function hasCreditmemos()
17921792
{
1793-
return $this->getCreditmemosCollection()->count();
1793+
return boolval($this->getCreditmemosCollection()->count());
17941794
}
17951795

17961796
/**

0 commit comments

Comments
 (0)