Source of file GroupDiscount.php
Size: 0,428 Bytes - Last Modified: 2021-12-23T10:11:33+00:00
/var/www/docs.ssmods.com/process/src/code/calculator/GroupDiscount.php
123456789101112131415161718192021 | <?php namespace EventRegistration\Calculator; class GroupDiscount extends Discount { public $name = "Group"; protected $minSize = 2; public function setMinSize($size) { $this->minSize = $size; return $this; } // the number of attendees is greater than the min size public function registrationQualifies(\EventRegistration $reg) { return ($this->getDiscountableAttendees($reg)->count() >= $this->minSize); } } |