AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

Parcel.php 412B

123456789101112131415161718192021
  1. <?php
  2. namespace App\Commerce\Shipping\EasyParcel;
  3. /**
  4. * The box being sent: weight in grams, size in centimetres.
  5. */
  6. final readonly class Parcel
  7. {
  8. public function __construct(
  9. public int $grams,
  10. public int $length,
  11. public int $width,
  12. public int $height,
  13. ) {}
  14. public function kilograms(): float
  15. {
  16. return round(max($this->grams, 10) / 1000, 2);
  17. }
  18. }