Skip to content

Commit b11faa1

Browse files
authored
Merge branch 'master' into v2.7.5
2 parents aa68640 + 970912e commit b11faa1

7 files changed

+68
-18
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "spatie/laravel-webhook-client",
2+
"name": "quick-order/laravel-webhook-client",
33
"description": "Receive webhooks in Laravel apps",
44
"keywords": [
55
"spatie",

src/Events/InvalidSignatureEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class InvalidSignatureEvent
88
{
99
/** @var \Illuminate\Http\Request */
10-
public Request $request;
10+
public $request;
1111

1212
public function __construct(Request $request)
1313
{

src/ProcessWebhookJob.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ abstract class ProcessWebhookJob implements ShouldQueue
1313
{
1414
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
1515

16-
public WebhookCall $webhookCall;
16+
/**
17+
* @var WebhookCall
18+
*/
19+
20+
public $webhookCall;
1721

1822
public function __construct(WebhookCall $webhookCall)
1923
{

src/WebhookClientServiceProvider.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,17 @@ public function boot()
2525
], 'migrations');
2626
}
2727

28-
Route::macro('webhooks', fn (string $url, string $name = 'default') => Route::post($url, '\Spatie\WebhookClient\WebhookController')->name("webhook-client-{$name}"));
28+
Route::macro('webhooks', function(string $url, string $name = 'default') {
29+
Route::post($url, '\Spatie\WebhookClient\WebhookController')->name("webhook-client-{$name}");
30+
});
2931

3032
$this->app->singleton(WebhookConfigRepository::class, function () {
3133
$configRepository = new WebhookConfigRepository();
3234

3335
collect(config('webhook-client.configs'))
34-
->map(fn (array $config) => new WebhookConfig($config))
36+
->map(function (array $config) {
37+
return new WebhookConfig($config);
38+
})
3539
->each(function (WebhookConfig $webhookConfig) use ($configRepository) {
3640
$configRepository->addConfig($webhookConfig);
3741
});

src/WebhookConfig.php

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,55 @@
1010

1111
class WebhookConfig
1212
{
13-
public string $name;
13+
public $name;
1414

15-
public string $signingSecret;
15+
/**
16+
* @var mixed|string
17+
*/
1618

17-
public string $signatureHeaderName;
19+
public $signingSecret;
1820

19-
public SignatureValidator $signatureValidator;
21+
/**
22+
* @var mixed|string
23+
*/
2024

21-
public WebhookProfile $webhookProfile;
25+
public $signatureHeaderName;
2226

23-
public RespondsToWebhook $webhookResponse;
27+
/**
28+
* @var \Illuminate\Contracts\Foundation\Application|mixed|SignatureValidator
29+
*/
2430

25-
public string $webhookModel;
31+
public $signatureValidator;
2632

27-
public string $processWebhookJobClass;
33+
/**
34+
* @var \Illuminate\Contracts\Foundation\Application|mixed|WebhookProfile
35+
*/
36+
37+
public $webhookProfile;
38+
39+
/**
40+
* @var \Illuminate\Contracts\Foundation\Application|mixed|RespondsToWebhook
41+
*/
42+
43+
public $webhookResponse;
44+
45+
/**
46+
* @var mixed|string
47+
*/
48+
49+
public $webhookModel;
50+
51+
/**
52+
* @var mixed|ProcessWebhookJob|string
53+
*/
54+
55+
public $processWebhookJobClass;
56+
57+
/**
58+
* WebhookConfig constructor.
59+
* @param array $properties
60+
* @throws InvalidConfig
61+
*/
2862

2963
public function __construct(array $properties)
3064
{

src/WebhookConfigRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
class WebhookConfigRepository
66
{
77
/** @var \Spatie\WebhookClient\WebhookConfig[] */
8-
protected array $configs;
8+
protected $configs;
99

1010
public function addConfig(WebhookConfig $webhookConfig)
1111
{

src/WebhookProcessor.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,19 @@
88
use Spatie\WebhookClient\Exceptions\WebhookFailed;
99
use Spatie\WebhookClient\Models\WebhookCall;
1010

11-
class WebhookProcessor
12-
{
13-
protected Request $request;
11+
class WebhookProcessor {
1412

15-
protected WebhookConfig $config;
13+
/**
14+
* @var Request
15+
*/
16+
17+
protected $request;
18+
19+
/**
20+
* @var WebhookConfig
21+
*/
22+
23+
protected $config;
1624

1725
public function __construct(Request $request, WebhookConfig $config)
1826
{

0 commit comments

Comments
 (0)