parameters: level: 5 paths: - src excludePaths: - src/vendor/* # WordPress specific configuration universalObjectCratesClasses: - stdClass ignoreErrors: # WordPress core functions - comprehensive list - '#Function (wp_|add_|get_|current_|esc_|sanitize_|is_admin|defined|admin_url|check_admin_referer|is_plugin_active|update_option|dbDelta|WP_Filesystem|wp_send_json_|wp_die|wp_verify_nonce|current_user_can|__|_e|_n|_x|esc_attr__|esc_html__|wp_nonce_field|wp_nonce_url|wp_create_nonce|plugin_dir_path|plugin_dir_url|register_activation_hook|register_deactivation_hook|register_uninstall_hook)[a-zA-Z_]+ not found#' # WordPress constants - extended list - '#Constant (CARE_BOOK_ULTIMATE_|WP_DEBUG|HOUR_IN_SECONDS|DAY_IN_SECONDS|FS_CHMOD_FILE|WPINC|WP_CONTENT_DIR|WP_PLUGIN_DIR|ABSPATH|OBJECT|ARRAY_A|ARRAY_N)[a-zA-Z_]+ not found#' # WordPress classes and types - '#Instantiated class (WP_REST_Response|WP_Filesystem_Base|WP_Query|WP_User|wpdb) not found#' - '#Parameter .* has invalid type (WP_REST_Request|WP_Filesystem_Base|WP_Query|WP_User|wpdb)#' - '#Method .* has invalid return type (WP_Filesystem_Base|WP_Query|WP_User|wpdb)#' - '#Class (WP_REST_Response|WP_Filesystem_Base|WP_Query|WP_User|wpdb) not found#' # WordPress hook system - '#Function (do_action|apply_filters|has_filter|has_action|remove_action|remove_filter) not found#' # Mixed types for WordPress compatibility - '#Parameter .* of method .* expects .*, mixed given#' - '#Method .* return type has no value type specified in iterable type array#' - '#Property .* type has no value type specified in iterable type array#' # Methods that might not exist (temporary - should be implemented) - '#Call to an undefined method CareBook\\Ultimate\\Services\\CssInjectionService::(getStatistics|generateRealTimeUpdate)\(\)#' - '#Call to an undefined method CareBook\\Ultimate\\Security\\SecurityValidator::(getAuditLog|sanitizeInt|sanitizeText|validateAjaxRequest|validateEntityType)\(\)#' - '#Call to an undefined method CareBook\\Ultimate\\Models\\Restriction::(getEntityType|getEntityId)\(\)#' # Allow certain patterns for WordPress integration - '#Call to an undefined method .* on an unknown class#' - '#Argument of an invalid type .* supplied for foreach, only iterables are supported#' - '#Negated boolean expression is always (true|false)#' - '#Variable .* might not be defined#' - '#Undefined variable: \$wpdb#' # WordPress specific patterns - '#Access to an undefined property .* on an unknown class#' - '#Method .* invoked with .* parameters, .* required#' # Constructor parameter mismatches (temporary - should be fixed) - '#Parameter .* of class .* constructor expects .*, .* given#' - '#Strict comparison using === between .* and .* will always evaluate to false#' # Private method access (may be intentional for internal APIs) - '#Call to private method .* of class .*#' bootstrapFiles: - phpstan-bootstrap.php # Additional WordPress compatibility stubFiles: - vendor/php-stubs/wordpress-stubs/wordpress-stubs.php # Type mapping for WordPress typeAliases: WP_Post: 'object' WP_User: 'object' WP_Query: 'object'