Skip to content

Commit

Permalink
Fix sniffer issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Jan 20, 2025
1 parent 0b3e537 commit ad234b0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Assert/HMACOutputLengthTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace SimpleSAML\XMLSecurity\Assert;

use SimpleSAML\Assert\AssertionFailedException;
use SimpleSAML\XML\Exception\SchemaViolationException;
use SimpleSAML\XMLSecurity\Exception\ProtocolViolationException;

Expand Down Expand Up @@ -48,6 +49,5 @@ protected static function validHMACOutputLength(string $value, string $message =
} catch (AssertionFailedException $e) {
throw new ProtocolViolationException($e->getMessage());
}

}
}
2 changes: 0 additions & 2 deletions src/Type/HMACOutputLengthValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@

namespace SimpleSAML\XMLSecurity\Type;

use SimpleSAML\XML\Exception\SchemaViolationException;
use SimpleSAML\XML\Type\IntegerValue;
use SimpleSAML\XMLSecurity\Assert\Assert;
use SimpleSAML\XMLSecurity\Exception\ProtocolViolationException;

/**
* @package simplesaml/xml-security
Expand Down
4 changes: 2 additions & 2 deletions tests/Assert/HMACOutputLengthTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use PHPUnit\Framework\Attributes\{CoversClass, DataProvider};
use PHPUnit\Framework\TestCase;
use SimpleSAML\Assert\AssertionFailedException;
use SimpleSAML\XML\Exception\SchemaViolationException;
use SimpleSAML\XMLSecurity\Assert\Assert;
use SimpleSAML\XMLSecurity\Exception\ProtocolViolationException;

Expand All @@ -28,7 +28,7 @@ public function testValidHMACOutputLength(bool $shouldPass, string $HMACOutputLe
try {
Assert::validHMACOutputLength($HMACOutputLength);
$this->assertTrue($shouldPass);
} catch (AssertionFailedException|ProtocolViolationException $e) {
} catch (SchemaViolationException | ProtocolViolationException $e) {
$this->assertFalse($shouldPass);
}
}
Expand Down

0 comments on commit ad234b0

Please sign in to comment.