isValid($val)) { throw new InvalidArgumentException("Valeur du rĂ´le invalide"); } $this->value = $val; } private function isValid(int $val): bool { return ($val <= self::MAX and $val >= self::MIN); } public function isPlayer(): bool { return ($this->value == self::ROLE_PLAYER); } public function isCoach(): bool { return ($this->value == self::ROLE_COACH); } }