@@ -43,6 +43,12 @@ class UserProfileFieldCheck implements ICheck {
4343 'greater ' ,
4444 '!less ' ,
4545 ];
46+ private const SELECT_OPERATORS = [
47+ self ::OPERATOR_IS_SET ,
48+ self ::OPERATOR_IS_NOT_SET ,
49+ 'is ' ,
50+ '!is ' ,
51+ ];
4652
4753 public function __construct (
4854 private IUserSession $ userSession ,
@@ -156,6 +162,7 @@ private function isOperatorSupported(FieldDefinition $definition, string $operat
156162 $ operators = match (FieldType::from ($ definition ->getType ())) {
157163 FieldType::TEXT => self ::TEXT_OPERATORS ,
158164 FieldType::NUMBER => self ::NUMBER_OPERATORS ,
165+ FieldType::SELECT => self ::SELECT_OPERATORS ,
159166 };
160167
161168 return in_array ($ operator , $ operators , true );
@@ -192,7 +199,8 @@ private function evaluate(FieldDefinition $definition, string $operator, string|
192199 $ expectedValue = $ normalizedExpected ['value ' ] ?? null ;
193200
194201 return match (FieldType::from ($ definition ->getType ())) {
195- FieldType::TEXT => $ this ->evaluateTextOperator ($ operator , (string )$ expectedValue , (string )$ actualValue ),
202+ FieldType::TEXT ,
203+ FieldType::SELECT => $ this ->evaluateTextOperator ($ operator , (string )$ expectedValue , (string )$ actualValue ),
196204 FieldType::NUMBER => $ this ->evaluateNumberOperator (
197205 $ operator ,
198206 $ this ->normalizeNumericComparisonOperand ($ expectedValue ),
0 commit comments