Skip to content
Snippets Groups Projects
Select Git revision
  • 1fc3518357c348c05f2e7814100206d1f5de2e4d
  • master default protected
  • bugfix/wordpress-review
  • fix/duplicate
  • bugfix/get_current_screen_fail
  • feature/dismiss-nonce
  • replace-dodgy-path
  • bugfix/notice-not-show
  • devel
  • 3.3.0
  • 3.2.5
  • 3.2.4
  • 3.2.3
  • 3.2.2
  • 3.2.1
  • 3.2.0
  • 3.2.0-beta7
  • 3.2.0-beta6
  • 3.2.0-beta5
  • 3.2.0-beta4
  • 3.2.0-beta3
  • 3.2.0-beta2
  • 3.2.0-beta1
  • 3.1.4
  • 3.1.4-beta1
  • 3.1.3
  • 3.1.1
  • 3.1
  • 3.0
29 results

TestAjaxHandler.php

Blame
  • static-analysis.yml 1.70 KiB
    .static-analysis:
      image: gitlab.wpdesk.dev:5050/wpdesk/docker-tests/php-box:8.4.1
      needs:
        - prepare prefixed vendor
      stage: tests
    
    phpstan:
      extends: .static-analysis
      script:
        - |
          if [ -f "vendor/bin/phpstan" ]; then
            vendor/bin/phpstan analyse --error-format=gitlab --memory-limit=2G > phpstan-codequality.json || true
            vendor/bin/phpstan analyse --error-format=junit --memory-limit=2G > phpstan-junit.xml
          elif [ -f "vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan" ]; then
            # PHPStan installed by director
            vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan analyse --error-format=gitlab --memory-limit=2G > phpstan-codequality.json || true
            vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan analyse --error-format=junit --memory-limit=2G > phpstan-junit.xml
          else
            echo "PHPStan not found! Install it with 'composer require --dev wpdesk/phpstan-rules'."
            exit 125
          fi
      artifacts:
        paths:
          - phpstan-codequality.json
          - phpstan-junit.json
        expire_in: 1 week
        reports:
          codequality: phpstan-codequality.json
          junit: phpstan-junit.xml
      rules:
        - !reference [.skip-mr, rules]
        - if: $CI_PROJECT_NAMESPACE =~ /predators/
          allow_failure: true
        - exists:
          - phpstan.neon.dist
    
    phpcs:
      extends: .static-analysis
      script:
        - vendor/bin/phpcs --warning-severity=0 --report-junit=phpcs-junit.xml --report-full
      rules:
        - !reference [.skip-mr, rules]
        - if: $CI_PROJECT_NAMESPACE =~ /predators/
          allow_failure: true
        - exists:
          - phpcs.xml.dist
      artifacts:
        paths:
          - phpcs-junit.xml
        expire_in: 1 week
        reports:
          junit: phpcs-junit.xml