mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-24 07:55:35 +00:00
Update CanBeBought.php
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
namespace Gloudemans\Shoppingcart;
|
namespace Gloudemans\Shoppingcart;
|
||||||
|
|
||||||
|
use Money\Money;
|
||||||
|
|
||||||
trait CanBeBought
|
trait CanBeBought
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@@ -16,8 +18,6 @@ trait CanBeBought
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the name, title or description of the Buyable item.
|
* Get the name, title or description of the Buyable item.
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
*/
|
||||||
public function getBuyableDescription(): ?string
|
public function getBuyableDescription(): ?string
|
||||||
{
|
{
|
||||||
@@ -34,10 +34,8 @@ trait CanBeBought
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the price of the Buyable item.
|
* Get the price of the Buyable item.
|
||||||
*
|
|
||||||
* @return float
|
|
||||||
*/
|
*/
|
||||||
public function getBuyablePrice()
|
public function getBuyablePrice(): Money
|
||||||
{
|
{
|
||||||
if (($price = $this->getAttribute('price'))) {
|
if (($price = $this->getAttribute('price'))) {
|
||||||
return $price;
|
return $price;
|
||||||
@@ -46,10 +44,8 @@ trait CanBeBought
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the weight of the Buyable item.
|
* Get the weight of the Buyable item.
|
||||||
*
|
|
||||||
* @return float
|
|
||||||
*/
|
*/
|
||||||
public function getBuyableWeight()
|
public function getBuyableWeight(): float
|
||||||
{
|
{
|
||||||
if (($weight = $this->getAttribute('weight'))) {
|
if (($weight = $this->getAttribute('weight'))) {
|
||||||
return $weight;
|
return $weight;
|
||||||
|
|||||||
Reference in New Issue
Block a user