Skip to content

Commit a56baf1

Browse files
authored
Merge pull request #58 from marcreichel/fix/findings
🚨 Fix PHPStan findings
2 parents 08c09fd + 5ee24aa commit a56baf1

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

.github/workflows/code-quality-pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- 'README.md'
1010

1111
jobs:
12-
build:
12+
phpstan-pr:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v2

.github/workflows/code-quality.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- 'README.md'
1010

1111
jobs:
12-
build:
12+
phpstan:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v2

.github/workflows/tests-pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- 'README.md'
1010

1111
jobs:
12-
test:
12+
run-tests-pr:
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
fail-fast: true

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- 'README.md'
1010

1111
jobs:
12-
test:
12+
run-tests:
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
fail-fast: true

src/Models/Webhook.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public function getModel(): string
202202
$reflectionCategory = new ReflectionClass(Category::class);
203203
$categories = collect($reflectionCategory->getConstants())->flip();
204204

205-
$category = $categories->get($this->category);
205+
$category = $categories->get((string) $this->category);
206206

207207
if (!is_string($category)) {
208208
return (string) $this->category;
@@ -219,7 +219,7 @@ public function getMethod(): string
219219
$reflectionMethod = new ReflectionClass(Method::class);
220220
$methods = collect($reflectionMethod->getConstants())->values();
221221

222-
$method = $methods->get($this->sub_category);
222+
$method = $methods->get((string) $this->sub_category);
223223

224224
if (!is_string($method)) {
225225
return (string) $this->sub_category;

0 commit comments

Comments
 (0)