Skip to content

Commit 452f97b

Browse files
committed
Adds type checking
1 parent 4dd0f94 commit 452f97b

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

.github/workflows/static-analysis.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: static analysis
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- '*.x'
8+
pull_request:
9+
schedule:
10+
- cron: '0 0 * * *'
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
tests:
17+
runs-on: ubuntu-22.04
18+
19+
strategy:
20+
fail-fast: true
21+
22+
name: Static Analysis
23+
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v3
27+
28+
- name: Setup PHP
29+
uses: shivammathur/setup-php@v2
30+
with:
31+
php-version: 8.2
32+
tools: composer:v2
33+
coverage: none
34+
35+
- name: Install dependencies
36+
uses: nick-fields/retry@v2
37+
with:
38+
timeout_minutes: 5
39+
max_attempts: 5
40+
command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
41+
42+
- name: Execute type checking
43+
run: vendor/bin/phpstan

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"illuminate/support": "~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0"
1919
},
2020
"require-dev": {
21+
"phpstan/phpstan": "^1.10",
2122
"phpunit/phpunit": "^7.0|^8.0|^9.0"
2223
},
2324
"autoload": {

phpstan.neon.dist

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
parameters:
2+
paths:
3+
- src
4+
5+
level: 0

0 commit comments

Comments
 (0)