diff --git a/composer.json b/composer.json index 2200585..1331bbf 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,10 @@ "composer/installers": "~1.0" }, "require-dev": { - "phpunit/phpunit": "^5.5" + "phpunit/phpunit": "^5.5", + "phpcompatibility/php-compatibility": "*", + "squizlabs/php_codesniffer": "3.*", + "wp-coding-standards/wpcs": "^0.14.1" }, "license": "MIT", "authors": [ @@ -24,6 +27,12 @@ "composer install", "bin/install-wp-tests.sh wordpress wordpress wordpress", "vendor/bin/phpunit" + ], + "post-install-cmd": [ + "\"vendor/bin/phpcs\" --config-set installed_paths vendor/phpcompatibility/php-compatibility,vendor/wp-coding-standards/wpcs" + ], + "post-update-cmd": [ + "\"vendor/bin/phpcs\" --config-set installed_paths vendor/phpcompatibility/php-compatibility,vendor/wp-coding-standards/wpcs" ] } } diff --git a/phpcs.xml b/phpcs.xml index 3313e50..a3a5f6a 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -4,6 +4,8 @@ ./activitypub.php ./includes/ + + *\.(inc|css|js|svg) */vendor/* */node_modules/*