Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function __construct($attributes)
*
* @return Event
*/
public static function constructFrom($data) : self
public static function constructFrom($data): self
{
return new static($data);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/WebhookFailed.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class WebhookFailed extends Exception
{
public static function signingSecretNotSet() : self
public static function signingSecretNotSet(): self
{
return new static('The webhook signing secret is not set. Make sure that the `signing_secret` config key is set to the correct value.');
}
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/HandleDelivered.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Illuminate\Queue\SerializesModels;
use Spatie\WebhookClient\Models\WebhookCall;

class HandleLetter_Created
class HandleDelivered
{
use Dispatchable, SerializesModels;

Expand Down
2 changes: 1 addition & 1 deletion src/Webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Webhook
* @param string $secret
* @return BinaryCats\LobWebhooks\Event
*/
public static function constructEvent(array $payload, array $signature, string $secret) : Event
public static function constructEvent(array $payload, array $signature, string $secret): Event
{
// verify we are good, else throw an expection
WebhookSignature::make($signature, $secret)->verify();
Expand Down
4 changes: 2 additions & 2 deletions src/WebhookSignature.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ public static function make($signatureArray, string $secret)
* @return bool
* @throws BinaryCats\LobWebhooks\Exceptions\SignatureVerificationException when validation fails
*/
public function verify() : bool
public function verify(): bool
{
if (hash_equals($this->signature, $this->computeSignature())) {
return true;
}

throw new SignatureVerificationException("Signature Verification Failed", 500);
throw new SignatureVerificationException('Signature Verification Failed', 500);
}

/**
Expand Down
1 change: 0 additions & 1 deletion tests/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace BinaryCats\LobWebhooks\Tests;

use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Route;
use Spatie\WebhookClient\Models\WebhookCall;
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function render($request, Exception $exception)
}

/**
* Compile lob.com siangure
* Compile lob.com siangure.
*
* @param array $payload
* @param int $timestamp
Expand Down