on: pull_request

name: Inspections
jobs:
  runPHPCSInspection:
    name: PHPCS
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
      with:
        fetch-depth: 0
        ref: ${{ github.event.pull_request.head.sha }}
        
    - name: Run PHPCS
      uses: rtCamp/action-phpcs-code-review@v3
      env:
        GH_BOT_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
        PHPCS_STANDARD_FILE_NAME: "tyche-phpcs.xml"
        NAME_TO_USE: "[Tyche Softwares](https://github.com/TycheSoftwares/)"
        INFORMATIONAL_MSG: "Powered by [Tyche Softwares](https://www.tychesoftwares.com/)"
      with:
        args: "PEAR,PHPCompatibility,PHPCompatibilityWP,PSR12,PSR2,Squiz,WordPress,WordPress-Core,WordPress-Docs,WordPress-Extra,WordPress-VIP,WordPress-VIP-Go,WordPressVIPMinimum"
