Composer and PHPCS added
A composer package descriptor has been added, along with a PHPunit descriptor and code sniffer ruleset.
This commit is contained in:
parent
4890dbaeeb
commit
1781335f25
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
composer.lock
|
||||||
|
/vendor/
|
||||||
|
.idea
|
28
composer.json
Normal file
28
composer.json
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"name": "stklcode/statify-blacklist",
|
||||||
|
"description": "A blacklist extension for the famous Statify WordPress plugin",
|
||||||
|
"keywords": [
|
||||||
|
"wordpress",
|
||||||
|
"plugin",
|
||||||
|
"statistics",
|
||||||
|
"blacklist"
|
||||||
|
],
|
||||||
|
"license": "GPL-2.0+",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Stefan Kalscheuer",
|
||||||
|
"email": "stefan@stklcode.de",
|
||||||
|
"homepage": "https://www.stklcode.de"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "wordpress-plugin",
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.5",
|
||||||
|
"composer/installers": "~1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"php": ">=5.5",
|
||||||
|
"phpunit/phpunit": "*",
|
||||||
|
"wp-coding-standards/wpcs": "~0.6.0"
|
||||||
|
}
|
||||||
|
}
|
9
phpunit.xml
Normal file
9
phpunit.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<phpunit bootstrap="./vendor/autoload.php">
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Statify Blacklist TestSuite">
|
||||||
|
<directory>./test</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
|
||||||
|
</phpunit>
|
15
ruleset.xml
Normal file
15
ruleset.xml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<ruleset name="StatifyBlacklist">
|
||||||
|
<description>Derived from WordPress</description>
|
||||||
|
<rule ref="WordPress">
|
||||||
|
<!-- Type hint checks mess up PHP 7 checks, while this plugin has compatibility level 5.5 and above. -->
|
||||||
|
<exclude name="Squiz.Commenting.FunctionComment.ScalarTypeHintMissing"/>
|
||||||
|
|
||||||
|
<!-- The plugin uses switch_to_blog for multisite handling. -->
|
||||||
|
<exclude name="WordPress.VIP.RestrictedFunctions.switch_to_blog"/>
|
||||||
|
|
||||||
|
<!-- Direct queries used to clean up statify table. -->
|
||||||
|
<exclude name="WordPress.VIP.DirectDatabaseQuery.DirectQuery"/>
|
||||||
|
<exclude name="WordPress.VIP.DirectDatabaseQuery.NoCaching"/>
|
||||||
|
</rule>
|
||||||
|
</ruleset>
|
Loading…
x
Reference in New Issue
Block a user