Skip to content
This repository was archived by the owner on Oct 24, 2022. It is now read-only.

Commit e8f4175

Browse files
committed
refactor: simplify FQDN
1 parent 6c88674 commit e8f4175

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/AttributeCheck.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
namespace SimpleSAML\Module\attribute_check;
66

7+
use SimpleSAML\Error\Exception;
8+
79
class 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

Comments
 (0)