Skip to content

Commit da44b86

Browse files
committed
feat: add static analysis workflow with PHPStan integration
1 parent b72a9d0 commit da44b86

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Static Analysis
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
- 'phpstan.dist.neon'
8+
9+
jobs:
10+
phpstan:
11+
name: phpstan
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: '8.1'
20+
coverage: none
21+
22+
- name: Install composer dependencies
23+
uses: ramsey/composer-install@v2
24+
25+
- name: Run PHPStan
26+
run: ./vendor/bin/phpstan --error-format=github

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ If you discover any security related issues, please email contact@lynh.me instea
126126

127127
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
128128

129-
[ico-version]: https://img.shields.io/packagist/v/jenky/api-error.svg?style=for-the-badge
129+
[ico-version]: https://img.shields.io/packagist/v/jenky/api-error.svg?logo=packagist&style=for-the-badge
130130
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=for-the-badge
131131
[ico-gh-actions]: https://img.shields.io/github/actions/workflow/status/jenky/api-error/testing.yml?branch=main&label=actions&logo=github&style=for-the-badge
132132
[ico-codecov]: https://img.shields.io/codecov/c/github/jenky/api-error?logo=codecov&style=for-the-badge

0 commit comments

Comments
 (0)