We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
composer require --dev szepeviktor/phpstan-wordpress vendor/bin/phpstan analyze
I've cleaned up the codebase up to Level 4. Robust code starts at Level 5!
Here is the config: phpstan.neon.dist
phpstan.neon.dist
includes: - vendor/szepeviktor/phpstan-wordpress/extension.neon parameters: level: 4 # level: max inferPrivatePropertyTypeFromConstructor: true paths: - integrations/ - wp-admin/ - wp-includes/ autoload_files: - tests/phpstan/bootstrap.php - integrations/functions.php - wp-includes/class-wp-web-app-manifest.php - wp-includes/class-wp-https-detection.php - wp-includes/class-wp-https-ui.php - wp-includes/interface-wp-service-worker-registry.php - wp-includes/interface-wp-service-worker-registry-aware.php - wp-includes/class-wp-service-workers.php - wp-includes/class-wp-service-worker-scripts.php - wp-includes/components/interface-wp-service-worker-component.php - wp-includes/components/class-wp-service-worker-configuration-component.php - wp-includes/components/class-wp-service-worker-navigation-routing-component.php - wp-includes/components/class-wp-service-worker-precaching-routes-component.php - wp-includes/components/class-wp-service-worker-precaching-routes.php - wp-includes/components/class-wp-service-worker-caching-routes-component.php - wp-includes/components/class-wp-service-worker-caching-routes.php - wp-includes/service-workers.php - wp-includes/default-filters.php - wp-includes/query.php - wp-includes/template.php - wp-includes/general-template.php - wp-includes/post-template.php - wp-includes/template-loader.php - wp-includes/class-wp.php - wp-includes/class-wp-query.php - wp-admin/admin.php autoload_directories: - integrations/ dynamicConstantNames: - SCRIPT_DEBUG ignoreErrors: # Uses func_get_args() - '#^Function apply_filters(_ref_array)? invoked with [34567] parameters, 2 required\.$#' # Dynamically generated - '#^Access to an undefined property WP_Query::\$(is_offline|is_500)\.$#'
:)
The text was updated successfully, but these errors were encountered:
ooops, the bootstrap file: tests/phpstan/bootstrap.php
tests/phpstan/bootstrap.php
<?php define( 'PWA_VERSION', '0.0.0' ); define( 'PWA_PLUGIN_FILE', dirname( __DIR__, 2 ) . '/pwa.php' ); define( 'PWA_PLUGIN_DIR', dirname( __DIR__, 2 ) ); define( 'PWA_PLUGIN_URL', '' ); define( 'WPINC', '' ); define( 'TEMPLATEPATH', '' ); define( 'STYLESHEETPATH', '' ); define( 'SCRIPT_DEBUG', true ); // Should use core function instead. define( 'WP_CONTENT_DIR', '' );
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
I've cleaned up the codebase up to Level 4.
Robust code starts at Level 5!
Here is the config:
phpstan.neon.dist
:)
The text was updated successfully, but these errors were encountered: