Skip to content
Snippets Groups Projects
Select Git revision
  • 2109111ba0d284f1b5eb562d743cd92e31886592
  • master default protected
  • fix/deprecated_functions
  • devel
  • feat/translations
  • feat/upgrade_to_pro_url
  • feat/lang
  • bugfix/require-interface
  • bugfix/require-once-error
  • feature/activation-hooks
  • feature/template-loader
  • feature/template-renderer
  • feature/plugin-activation
  • feature/hookable-object
  • feature/builder-pattern
  • 2.1.2
  • 2.1.1
  • 2.1.0
  • 2.0.0
  • 2.0.0-beta1
  • 1.4.4
  • 1.4.3
  • 1.4.2
  • 1.4.1
  • 1.4
  • 1.3.3
  • 1.3.2
  • 1.3.1
  • 1.3.0
  • 1.2.0
  • 1.1
  • 1.0
32 results

AbstractBuilder.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