<commit_before>name: "Static Analysis"

on:
  pull_request:
    branches:
      - "*.x"
    paths:
      - .github/workflows/static-analysis.yml
      - composer.*
      - lib/**
      - phpstan.neon.dist
      - psalm.xml.dist
      - psalm-strict.xml
      - static-analysis/**
      - tests/**
  push:
    branches:
      - "*.x"
    paths:
      - .github/workflows/static-analysis.yml
      - composer.*
      - lib/**
      - phpstan.neon.dist
      - psalm.xml.dist
      - psalm-strict.xml
      - static-analysis/**
      - tests/**

jobs:
  static-analysis-phpstan:
    name: "Static Analysis with PHPStan"
    runs-on: "ubuntu-20.04"

    strategy:
      matrix:
        php-version:
          - "8.0"

    steps:
      - name: "Checkout code"
        uses: "actions/checkout@v2"

      - name: "Install PHP"
        uses: "shivammathur/setup-php@v2"
        with:
          coverage: "none"
          php-version: "${{ matrix.php-version }}"
          tools: "cs2pr"

      - name: "Install dependencies with Composer"
        uses: "ramsey/composer-install@v1"

      - name: "Run a static analysis with phpstan/phpstan"
        run: "vendor/bin/phpstan --error-format=checkstyle | cs2pr"

  static-analysis-psalm:
    name: "Static Analysis with Psalm"
    runs-on: "ubuntu-20.04"

    strategy:
      matrix:
        php-version:
          - "8.0"

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Install PHP
        uses: shivammathur/setup-php@v2
        with:
          coverage: none
          php-version: ${{ matrix.php-version }}
          tools: cs2pr

      - name: Install dependencies with Composer
        uses: ramsey/composer-install@v1<commit_msg>Run static analysis jobs on PHP 8.1<commit_after>name: "Static Analysis"

on:
  pull_request:
    branches:
      - "*.x"
    paths:
      - .github/workflows/static-analysis.yml
      - composer.*
      - lib/**
      - phpstan.neon.dist
      - psalm.xml.dist
      - psalm-strict.xml
      - static-analysis/**
      - tests/**
  push:
    branches:
      - "*.x"
    paths:
      - .github/workflows/static-analysis.yml
      - composer.*
      - lib/**
      - phpstan.neon.dist
      - psalm.xml.dist
      - psalm-strict.xml
      - static-analysis/**
      - tests/**

jobs:
  static-analysis-phpstan:
    name: "Static Analysis with PHPStan"
    runs-on: "ubuntu-20.04"

    strategy:
      matrix:
        php-version:
          - "8.1"

    steps:
      - name: "Checkout code"
        uses: "actions/checkout@v2"

      - name: "Install PHP"
        uses: "shivammathur/setup-php@v2"
        with:
          coverage: "none"
          php-version: "${{ matrix.php-version }}"
          tools: "cs2pr"

      - name: "Install dependencies with Composer"
        uses: "ramsey/composer-install@v1"

      - name: "Run a static analysis with phpstan/phpstan"
        run: "vendor/bin/phpstan --error-format=checkstyle | cs2pr"

  static-analysis-psalm:
    name: "Static Analysis with Psalm"
    runs-on: "ubuntu-20.04"

    strategy:
      matrix:
        php-version:
          - "8.1"

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Install PHP
        uses: shivammathur/setup-php@v2
        with:
          coverage: none
          php-version: ${{ matrix.php-version }}
          tools: cs2pr

      - name: Install dependencies with Composer
        uses: ramsey/composer-install@v1
{'fraction_non_alphanumeric': 0.12702546296296297, 'fraction_numerical': 0.01273148148148148, 'mean_word_length': 1.6840062111801242, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, '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': '5280735', 'n_tokens_mistral': 1198, 'n_tokens_neox': 1140, 'n_words': 233}