File manager - Edit - /home/premiey/www/wp-content/plugins/ameliabooking/src/Domain/ValueObjects/Discount.php
Back
<?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\ValueObjects; /** * Class Discount * * @package AmeliaBooking\Domain\ValueObjects */ final class Discount { const PERCENTAGE = 1; const FIXED = 2; /** @var int|null */ private $id; /** @var float */ private $amount; /** @var int */ private $type; /** * Discount constructor. * * @param float $amount * @param int $type */ public function __construct($amount, $type = self::PERCENTAGE) { $this->amount = $amount; $this->type = (int)$type; } /** * @return float */ public function getAmount() { return $this->amount; } /** * @return int */ public function getType() { return $this->type; } /** * @return array */ public function toArray() { return [ 'amount' => $this->getAmount(), 'type' => $this->getType(), ]; } }
| ver. 1.4 |
Github
|
.
| PHP 5.4.45 | Generation time: 0 |
proxy
|
phpinfo
|
Settings