Skip to content

Commit

Permalink
[chore] linter
Browse files Browse the repository at this point in the history
  • Loading branch information
ponsfrilus committed Nov 28, 2023
1 parent fc30fa4 commit 8990d7b
Show file tree
Hide file tree
Showing 7 changed files with 833 additions and 879 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,18 @@ gh-release: create-gh-release.sh

## Install PHP code sniffer, PHP CS Fixer, PHP code beautifuler and fixer and the wp-coding-standards, wpcs
install_phpcs:
composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer require squizlabs/php_codesniffer friendsofphp/php-cs-fixer wp-coding-standards/wpcs --dev -W
./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs
composer update wp-coding-standards/wpcs --with-dependencies
# Verify with vendor/bin/phpcs --config-show
./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs,vendor/phpcsstandards/phpcsutils,vendor/phpcsstandards/phpextra
./vendor/bin/phpcs --config-set default_standard WordPress-Core

.PHONY: phpcs
## Run PHP Code Sniffer linter using WordPress coding standards
phpcs:
@echo '**** run phpcs ****'
./vendor/bin/phpcs --standard=WordPress --extensions=php --ignore="vendor/*,lib" .
./vendor/bin/phpcs -ps --standard=WordPress --extensions=php --ignore="vendor/*,lib" .

.PHONY: phpcs-wpcore
## Run PHP Code Sniffer linter using WordPress-Core coding standards
Expand Down
247 changes: 121 additions & 126 deletions class-wpforms-epfl-payonline.php

Large diffs are not rendered by default.

221 changes: 110 additions & 111 deletions class-wpforms-saferpay.php

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"require-dev": {
"squizlabs/php_codesniffer": "^3.6",
"friendsofphp/php-cs-fixer": "^3.8",
"wp-coding-standards/wpcs": "^2.3"
"squizlabs/php_codesniffer": "^3.7",
"friendsofphp/php-cs-fixer": "^3.40",
"wp-coding-standards/wpcs": "^3.0"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
Loading

0 comments on commit 8990d7b

Please sign in to comment.