-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # src/DriverAdapter.php
- Loading branch information
Showing
8 changed files
with
1,081 additions
and
999 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ruleset name="phpmd-no-controversial" | ||
xmlns="http://pmd.sf.net/ruleset/1.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" | ||
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> | ||
<description> | ||
Enable all rulesets, except Controversial ("camelCase" rules). | ||
Required for WordPress development. | ||
</description> | ||
<rule ref="rulesets/naming.xml/ShortVariable"> | ||
<properties> | ||
<!-- common in WP --> | ||
<property name="exceptions" value="id,wp" /> | ||
</properties> | ||
</rule> | ||
|
||
<rule ref="rulesets/codesize.xml"/> | ||
<rule ref="rulesets/design.xml"> | ||
<!-- normal in WP for redirects, etc --> | ||
<exclude name="ExitExpression" /> | ||
</rule> | ||
<rule ref="rulesets/naming.xml"/> | ||
<rule ref="rulesets/unusedcode.xml"/> | ||
<rule ref="rulesets/cleancode.xml"/> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#$ composer update --optimize-autoloader | ||
#$ vendor/bin/phpstan analyze | ||
|
||
includes: | ||
# @see https://github.com/phpstan/phpstan-src/blob/master/conf/bleedingEdge.neon | ||
- phar://phpstan.phar/conf/bleedingEdge.neon | ||
# Include this extension | ||
- vendor/szepeviktor/phpstan-wordpress/extension.neon | ||
parameters: | ||
level: max | ||
inferPrivatePropertyTypeFromConstructor: true | ||
bootstrapFiles: | ||
# Missing constants, function and class stubs | ||
- %currentWorkingDirectory%/vendor/autoload.php | ||
scanFiles: | ||
- %currentWorkingDirectory%/wp-object-cache.php | ||
# autoload_directories: | ||
# - %currentWorkingDirectory%/inc/ | ||
paths: | ||
- %currentWorkingDirectory%/src/ | ||
- %currentWorkingDirectory%/include/ | ||
# excludes_analyse: | ||
# - %currentWorkingDirectory%/inc/views/ | ||
ignoreErrors: | ||
# Uses func_get_args() | ||
- '#^Function apply_filters(_ref_array)? invoked with [34567] parameters, 2 required\.$#' | ||
# Fixed in WordPress 5.3 | ||
- '#^Function do_action(_ref_array)? invoked with [3456] parameters, 1-2 required\.$#' | ||
- '#^Function current_user_can invoked with 2 parameters, 1 required\.$#' | ||
- '#^Function add_query_arg invoked with [123] parameters?, 0 required\.$#' | ||
- '#^Function wp_sprintf invoked with [23456] parameters, 1 required\.$#' | ||
- '#^Function add_post_type_support invoked with [345] parameters, 2 required\.$#' | ||
- '#^Function ((get|add)_theme_support|current_theme_supports) invoked with [2345] parameters, 1 required\.$#' | ||
# https://core.trac.wordpress.org/ticket/43304 | ||
- '/^Parameter #2 \$deprecated of function load_plugin_textdomain expects string, false given\.$/' | ||
# WP-CLI accepts a class name as callable | ||
- '/^Parameter #2 \$callable of static method WP_CLI::add_command\(\) expects callable\(\): mixed, \S+ given\.$/' | ||
# Please consider commenting ignores: issue URL or reason for ignoring |
Oops, something went wrong.