44
55namespace SimpleSAML \Module \attribute_check ;
66
7+ use SimpleSAML \Error \Exception ;
8+
79class AttributeCheck
810{
911 public const MANDATORY_ONE = 'MANDATORY_AT_LEAST_ONE ' ;
@@ -22,15 +24,15 @@ public static function handleAttributesGroup($t, $conf, $attributes): string
2224 $ type = $ conf ['type ' ];
2325
2426 if (! in_array ($ type , [self ::MANDATORY_ONE , self ::MANDATORY_ALL , self ::OPTIONAL ], true )) {
25- throw new \ SimpleSAML \ Error \ Exception ('AttributeSP: Bad type! ' );
27+ throw new Exception ('AttributeSP: Bad type! ' );
2628 }
2729
2830 $ title = self ::translate ($ t , $ translates , 'title ' );
2931 $ description = self ::translate ($ t , $ translates , 'description ' );
3032
3133 $ group_attributes = $ conf ['attribute_list ' ];
3234 if (! is_array ($ group_attributes )) {
33- throw new \ SimpleSAML \ Error \ Exception ('Attributes must be an array! ' );
35+ throw new Exception ('Attributes must be an array! ' );
3436 }
3537
3638 $ result = self ::getGroupResult ($ type , $ group_attributes , $ attributes );
@@ -47,7 +49,7 @@ public static function handleAttributesGroup($t, $conf, $attributes): string
4749 private static function translate ($ t , $ translates , $ key ): string
4850 {
4951 if ($ translates === null ) {
50- throw new \ SimpleSAML \ Error \ Exception ('Translation configuration cannot be null! ' );
52+ throw new Exception ('Translation configuration cannot be null! ' );
5153 }
5254
5355 if (isset ($ translates [$ key ])) {
0 commit comments