Skip to content

Commit 0afaf1e

Browse files
authored
Merge pull request #19 from binary-cats/analysis-RvBrpx
Apply fixes from StyleCI
2 parents cf22c50 + 082ca1b commit 0afaf1e

11 files changed

+25
-25
lines changed

src/Event.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ final class Event implements WebhookEvent
1616
/**
1717
* Create new Event.
1818
*
19-
* @param mixed[] $attributes
19+
* @param mixed[] $attributes
2020
*/
2121
public function __construct(array $attributes)
2222
{
2323
$this->attributes = $attributes;
2424
}
2525

2626
/**
27-
* Static event constructor
27+
* Static event constructor.
2828
*
29-
* @param mixed[] $data
29+
* @param mixed[] $data
3030
* @return static
3131
*/
3232
public static function constructFrom(array $data): self

src/Exceptions/UnexpectedValueException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class UnexpectedValueException extends BaseUnexpectedValueException
88
{
99
/**
10-
* @param \Illuminate\Http\Request $request
10+
* @param \Illuminate\Http\Request $request
1111
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response
1212
*/
1313
public function render($request)

src/Exceptions/WebhookFailed.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ public static function missingType(WebhookCall $webhookCall): self
4141
{
4242
return new static("Webhook call id `{$webhookCall->getKey()}` did not contain a type. Valid Mailgun webhook calls should always contain a type.");
4343
}
44+
4445
/**
45-
* @param \Illuminate\Http\Request $request
46+
* @param \Illuminate\Http\Request $request
4647
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response
4748
*/
4849
public function render($request)

src/Jobs/HandleDelivered.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class HandleDelivered
2020
/**
2121
* Create new Job.
2222
*
23-
* @param \Spatie\WebhookClient\Models\WebhookCall $webhookCall
23+
* @param \Spatie\WebhookClient\Models\WebhookCall $webhookCall
2424
*/
2525
public function __construct(WebhookCall $webhookCall)
2626
{

src/MailgunSignatureValidator.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ class MailgunSignatureValidator implements SignatureValidator
1212
/**
1313
* True if the signature has been valiates.
1414
*
15-
* @param \Illuminate\Http\Request $request
16-
* @param \Spatie\WebhookClient\WebhookConfig $config
17-
*
15+
* @param \Illuminate\Http\Request $request
16+
* @param \Spatie\WebhookClient\WebhookConfig $config
1817
* @return bool
1918
*/
2019
public function isValid(Request $request, WebhookConfig $config): bool
@@ -38,7 +37,7 @@ public function isValid(Request $request, WebhookConfig $config): bool
3837
/**
3938
* Validate the incoming signature' schema.
4039
*
41-
* @param \Illuminate\Http\Request $request
40+
* @param \Illuminate\Http\Request $request
4241
* @return string[]
4342
*/
4443
protected function signature(Request $request): array

src/MailgunWebhooksController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ class MailgunWebhooksController
1212
/**
1313
* Invoke controller method.
1414
*
15-
* @param \Illuminate\Http\Request $request
16-
* @param string|null $configKey
15+
* @param \Illuminate\Http\Request $request
16+
* @param string|null $configKey
1717
* @return \Illuminate\Http\Response
1818
*/
1919
public function __invoke(Request $request, string $configKey = null)

src/ProcessMailgunWebhookJob.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function handle()
2525
{
2626
$type = Arr::get($this->webhookCall, "payload.{$this->key}");
2727

28-
if (!$type) {
28+
if (! $type) {
2929
throw WebhookFailed::missingType($this->webhookCall);
3030
}
3131

@@ -37,7 +37,7 @@ public function handle()
3737
return;
3838
}
3939

40-
if (!class_exists($jobClass)) {
40+
if (! class_exists($jobClass)) {
4141
throw WebhookFailed::jobClassDoesNotExist($jobClass, $this->webhookCall);
4242
}
4343

src/Webhook.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ class Webhook
99
/**
1010
* Validate and raise an appropriate event.
1111
*
12-
* @param mixed[] $payload
13-
* @param string[] $signature
14-
* @param string $secret
12+
* @param mixed[] $payload
13+
* @param string[] $signature
14+
* @param string $secret
1515
* @return \BinaryCats\MailgunWebhooks\Event
16+
*
1617
* @throws WebhookFailed
1718
*/
1819
public static function constructEvent(array $payload, array $signature, string $secret): Event

src/WebhookSignature.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class WebhookSignature
2727
* @param string[] $signatureArray
2828
* @param string $secret
2929
*/
30-
public function __construct(array $signatureArray , string $secret)
30+
public function __construct(array $signatureArray, string $secret)
3131
{
3232
$this->signatureArray = $signatureArray;
3333
$this->secret = $secret;
@@ -37,7 +37,7 @@ public function __construct(array $signatureArray , string $secret)
3737
* Static accessor into the class constructor.
3838
*
3939
* @param string[] $signatureArray
40-
* @param string $secret
40+
* @param string $secret
4141
* @return WebhookSignature static
4242
*/
4343
public static function make($signatureArray, string $secret)
@@ -73,7 +73,7 @@ protected function computeSignature()
7373
/**
7474
* Magically access items from signature array.
7575
*
76-
* @param string $attribute
76+
* @param string $attribute
7777
* @return mixed
7878
*/
7979
public function __get($attribute)

tests/DummyJob.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class DummyJob
1616
/**
1717
* Create new Job.
1818
*
19-
* @param \Spatie\WebhookClient\Models\WebhookCall $webhookCall
19+
* @param \Spatie\WebhookClient\Models\WebhookCall $webhookCall
2020
*/
2121
public function __construct(WebhookCall $webhookCall)
2222
{

tests/TestCase.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Tests;
44

55
use BinaryCats\MailgunWebhooks\MailgunWebhooksServiceProvider;
6-
use CreateWebhookCallsTable;
76
use Exception;
87
use Illuminate\Contracts\Debug\ExceptionHandler;
98
use Illuminate\Foundation\Exceptions\Handler;
@@ -24,7 +23,7 @@ public function setUp(): void
2423
/**
2524
* Set up the environment.
2625
*
27-
* @param \Illuminate\Foundation\Application $app
26+
* @param \Illuminate\Foundation\Application $app
2827
*/
2928
protected function getEnvironmentSetUp($app)
3029
{
@@ -43,13 +42,13 @@ protected function getEnvironmentSetUp($app)
4342
*/
4443
protected function setUpDatabase()
4544
{
46-
$migration = include __DIR__.'/../vendor/spatie/laravel-webhook-client/database/migrations/create_webhook_calls_table.php.stub';
45+
$migration = include __DIR__.'/../vendor/spatie/laravel-webhook-client/database/migrations/create_webhook_calls_table.php.stub';
4746

4847
$migration->up();
4948
}
5049

5150
/**
52-
* @param \Illuminate\Foundation\Application $app
51+
* @param \Illuminate\Foundation\Application $app
5352
* @return array
5453
*/
5554
protected function getPackageProviders($app)

0 commit comments

Comments
 (0)