<commit_before>name: PHP

on:
  push:
    branches:
    - "5.2"
    - "5.3"
    - master
  pull_request:

jobs:
  syntax:
    name: "Check Syntax (${{ matrix.php }})"
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        php:
        - '7.2'
        - '7.3'
        - '7.4'
        - '8.0'
    steps:
    - name: Set up PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: ${{ matrix.php }}
    - uses: actions/checkout@v2
    - run: echo "::add-matcher::.github/php-syntax.json"
    - name: Remove files to be ignored
      run: |
        rm wcfsetup/install/files/lib/system/api/ezyang/htmlpurifier/library/HTMLPurifier.autoload-legacy.php
    - run: |
        ! find . -type f -name '*.php' -exec php -l '{}' \; 2>&1 |grep -v '^No syntax errors detected'<commit_msg>Ignore symfony/polyfill-mbstring/bootstrap80.php during syntax check<commit_after>name: PHP

on:
  push:
    branches:
    - "5.2"
    - "5.3"
    - master
  pull_request:

jobs:
  syntax:
    name: "Check Syntax (${{ matrix.php }})"
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        php:
        - '7.2'
        - '7.3'
        - '7.4'
        - '8.0'
    steps:
    - name: Set up PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: ${{ matrix.php }}
    - uses: actions/checkout@v2
    - run: echo "::add-matcher::.github/php-syntax.json"
    - name: Remove files to be ignored
      run: |
        rm wcfsetup/install/files/lib/system/api/ezyang/htmlpurifier/library/HTMLPurifier.autoload-legacy.php
        rm wcfsetup/install/files/lib/system/api/symfony/polyfill-mbstring/bootstrap80.php
    - run: |
        ! find . -type f -name '*.php' -exec php -l '{}' \; 2>&1 |grep -v '^No syntax errors detected'
{'fraction_non_alphanumeric': 0.15178571428571427, 'fraction_numerical': 0.020089285714285716, 'mean_word_length': 1.9154471544715448, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5416042', 'n_tokens_mistral': 685, 'n_tokens_neox': 666, 'n_words': 137}