Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding phpstan #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/php-stan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: PHPStan
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
phpstan:
name: "Php-Stan"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Get composer cache directory
id: get-composer-cache-dir
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: phpstan

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.get-composer-cache-dir.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run PHPStan
run: phpstan analyse -c php-stan.neon
7 changes: 7 additions & 0 deletions php-stan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
parameters:
scanDirectories:
- adresse/
level: 0
ignoreErrors:
paths:
- adresse/