/** * @param string $comment * @param boolean $internal */ public function __construct($comment, $internal = false) { Assert\lazy()->that($comment, 'comment')->notEmpty()->string()->that($internal, 'internal')->boolean()->verifyNow(); $this->comment = $comment; $this->internal = $internal; $this->createdAt = new \DateTime('now'); }
/** * @param string $type * @param string $statName * @param string $player */ public function __construct($type, $statName, $player) { Assert\lazy()->that($type, 'type')->string()->choice([self::GIVE, self::TAKE])->that($statName, 'statName')->notEmpty()->string()->that($player, 'player')->notEmpty()->string()->verifyNow(); $this->type = $type; $this->statName = $statName; $this->player = $player; }
/** * @param string $customerName * @param string $customerPhone * @param string $customerEmail * @param \DateTime $estimatedEnd * @param string $description */ public function __construct($customerName, $customerPhone, $customerEmail, \DateTime $estimatedEnd, $description = null) { \Assert\lazy()->that($customerName, 'customerName')->notEmpty()->string()->that($customerPhone, 'customerPhone')->notEmpty()->string()->that($customerEmail, 'customerEmail')->email()->that($description, 'description')->nullOr()->string()->verifyNow(); $this->customerName = $customerName; $this->customerPhone = $customerPhone; $this->customerEmail = $customerEmail; $this->estimatedEnd = $estimatedEnd; $this->description = $description; $this->createdAt = new \DateTime('now'); $this->comments = new ArrayCollection(); }
/** * @param string $player * @param string|null $reason */ public function __construct($player, $reason = null) { Assert\lazy()->that($player, 'player')->notEmpty()->string()->that($reason, 'reason')->nullOr()->string()->verifyNow(); $this->player = $player; $this->reason = $reason; }
/** * @param string $list */ public function __construct($list) { Assert\lazy()->that($list, 'list')->notEmpty()->choice(['ips', 'players'])->verifyNow(); $this->list = $list; }
/** * @param string $username * @param string $password */ public function __construct($username, $password) { Assert\lazy()->that($username, 'username')->string()->that($password, 'password')->string()->verifyNow(); $this->username = $username; $this->password = $password; }
/** * @param string $address * @param string|null $reason */ public function __construct($address, $reason = null) { Assert\lazy()->that($address, 'address')->notEmpty()->string()->that($reason, 'reason')->nullOr()->string()->verifyNow(); $this->address = $address; $this->reason = $reason; }