Skip to content

Feat/cleanup

Feat/cleanup #80

Workflow file for this run

name: PHPStan
on:
pull_request:
paths:
- '**.php'
- 'phpstan.neon.dist'
- '.github/workflows/phpstan.yml'
jobs:
phpstan:
name: phpstan
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer:v2
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.YARD_BOT_PAT }}
- name: Install composer dependencies
run: composer install --prefer-dist --no-interaction
- name: Dirty fix for previously defined function
run: sed -i -e 's#function __(#function ____(#' ./vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
- name: Run PHPStan
run: ./vendor/bin/phpstan --error-format=github