vendor/shopware/core/Checkout/Cart/Price/Struct/ReferencePrice.php line 7

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Checkout\Cart\Price\Struct;
  3. use Shopware\Core\Framework\Util\FloatComparator;
  4. class ReferencePrice extends ReferencePriceDefinition
  5. {
  6.     /**
  7.      * @var float
  8.      */
  9.     protected $price;
  10.     public function __construct(float $pricefloat $purchaseUnitfloat $referenceUnitstring $unitName)
  11.     {
  12.         parent::__construct($purchaseUnit$referenceUnit$unitName);
  13.         $this->price FloatComparator::cast($price);
  14.     }
  15.     public function getPrice(): float
  16.     {
  17.         return FloatComparator::cast($this->price);
  18.     }
  19.     public function getApiAlias(): string
  20.     {
  21.         return 'cart_price_reference';
  22.     }
  23. }