Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Nguyen Van Nguyen <[email protected]>
  • Loading branch information
nguyennv committed Jan 18, 2024
1 parent 4a8f3b2 commit 8988b15
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Message/CleartextMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function getText(): string
*/
public function getNormalizeText(): string
{
return preg_replace('/\r\n/m', "\n", rtrim($this->text));
return preg_replace('/\r\n/m', "\n", $this->getText());
}

/**
Expand All @@ -72,8 +72,8 @@ public function sign(
return new SignedMessage(
$this->getText(), $this->createSignature(
$signingKeys,
$notationData,
false,
$notationData,
$time
)
);
Expand All @@ -90,8 +90,8 @@ public function signDetached(
{
return $this->createSignature(
$signingKeys,
$notationData,
true,
$notationData,
$time
);
}
Expand All @@ -114,15 +114,15 @@ public function verifyDetached(
* Create literal signature.
*
* @param array $signingKeys
* @param bool $detached
* @param NotationDataInterface $notationData
* @param DateTimeInterface $time
* @param bool $detached
* @return SignatureInterface
*/
private function createSignature(
array $signingKeys,
?NotationDataInterface $notationData = null,
bool $detached = false,
?NotationDataInterface $notationData = null,
?DateTimeInterface $time = null,
): SignatureInterface
{
Expand Down

0 comments on commit 8988b15

Please sign in to comment.