Skip to content

Commit ad234b0

Browse files
committed
Fix sniffer issues
1 parent 0b3e537 commit ad234b0

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/Assert/HMACOutputLengthTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace SimpleSAML\XMLSecurity\Assert;
66

7+
use SimpleSAML\Assert\AssertionFailedException;
78
use SimpleSAML\XML\Exception\SchemaViolationException;
89
use SimpleSAML\XMLSecurity\Exception\ProtocolViolationException;
910

@@ -48,6 +49,5 @@ protected static function validHMACOutputLength(string $value, string $message =
4849
} catch (AssertionFailedException $e) {
4950
throw new ProtocolViolationException($e->getMessage());
5051
}
51-
5252
}
5353
}

src/Type/HMACOutputLengthValue.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44

55
namespace SimpleSAML\XMLSecurity\Type;
66

7-
use SimpleSAML\XML\Exception\SchemaViolationException;
87
use SimpleSAML\XML\Type\IntegerValue;
98
use SimpleSAML\XMLSecurity\Assert\Assert;
10-
use SimpleSAML\XMLSecurity\Exception\ProtocolViolationException;
119

1210
/**
1311
* @package simplesaml/xml-security

tests/Assert/HMACOutputLengthTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use PHPUnit\Framework\Attributes\{CoversClass, DataProvider};
88
use PHPUnit\Framework\TestCase;
9-
use SimpleSAML\Assert\AssertionFailedException;
9+
use SimpleSAML\XML\Exception\SchemaViolationException;
1010
use SimpleSAML\XMLSecurity\Assert\Assert;
1111
use SimpleSAML\XMLSecurity\Exception\ProtocolViolationException;
1212

@@ -28,7 +28,7 @@ public function testValidHMACOutputLength(bool $shouldPass, string $HMACOutputLe
2828
try {
2929
Assert::validHMACOutputLength($HMACOutputLength);
3030
$this->assertTrue($shouldPass);
31-
} catch (AssertionFailedException|ProtocolViolationException $e) {
31+
} catch (SchemaViolationException | ProtocolViolationException $e) {
3232
$this->assertFalse($shouldPass);
3333
}
3434
}

0 commit comments

Comments
 (0)