Skip to content

Commit d69de1d

Browse files
committed
refactor: update phpstan baseline and add type hints for event data
1 parent 736da00 commit d69de1d

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,5 @@ parameters:
1212
- message: '#Cannot cast mixed to int#'
1313
path: src/*.php
1414

15-
- message: '#Cannot access an offset on mixed.#'
16-
path: src/*.php
17-
1815
- message: '#Cannot access offset .+ on mixed#'
1916
path: src/*.php

src/Jobs/ProcessAggregatedEvents.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public function __construct(string $nodeId)
3333
public function handle(): void
3434
{
3535
$commentAggregationCacheKey = config('github-project.comment_aggregation_cache_key')."_{$this->nodeId}";
36+
37+
/** @var array<string, mixed> $eventMessages */
3638
$eventMessages = Cache::pull($commentAggregationCacheKey, []);
3739

3840
if (empty($eventMessages)) {

src/Jobs/ProcessWebhookEvent.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ class ProcessWebhookEvent implements ShouldQueue
2121
*/
2222
protected array $eventData;
2323

24+
/**
25+
* Create a new job instance.
26+
*
27+
* @param array<string, mixed> $eventData
28+
*/
2429
public function __construct(array $eventData)
2530
{
2631
$this->eventData = $eventData;

0 commit comments

Comments
 (0)