Skip to content

Commit bf63d68

Browse files
committed
Getters for min and max values
1 parent 9d00323 commit bf63d68

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

src/Discord/Builders/Components/CheckboxGroup.php

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static function new(?string $custom_id = null): self
6666
}
6767

6868
/**
69-
* Sets the minimum number of files which must be uploaded.
69+
* Sets the minimum number of items that must be chosen.
7070
*
7171
* @param int|null $min_values Default `1`, minimum `0` and maximum `10`. `null` to set as default.
7272
*
@@ -86,7 +86,17 @@ public function setMinValues(?int $min_values = null): self
8686
}
8787

8888
/**
89-
* Sets the maximum number of files which can be uploaded.
89+
* Gets the minimum number of items that must be chosen.
90+
*
91+
* @return int|null
92+
*/
93+
public function getMinValues(): ?int
94+
{
95+
return $this->min_values ?? null;
96+
}
97+
98+
/**
99+
* Sets the maximum number of items that can be chosen.
90100
*
91101
* @param int|null $max_values Default `1` and maximum `10`. `null` to set as default.
92102
*
@@ -105,6 +115,16 @@ public function setMaxValues(?int $max_values = null): self
105115
return $this;
106116
}
107117

118+
/**
119+
* Gets the maximum number of items that can be chosen.
120+
*
121+
* @return int|null
122+
*/
123+
public function getMaxValues(): ?int
124+
{
125+
return $this->max_values ?? null;
126+
}
127+
108128
/**
109129
* @inheritDoc
110130
*/

0 commit comments

Comments
 (0)