diff --git a/composer.json b/composer.json index 1f5d325..ea58b40 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "loadsys/loadsys_codesniffer", "description": "Loadsys CodeSniffer Standards, uses the CakePHP core team's as a base.", - "type": "library", + "type": "phpcs-coding-standard", "keywords": ["framework", "codesniffer"], "homepage": "https://github.com/loadsys/loadsys_codesniffer", "support": { @@ -9,11 +9,12 @@ "source": "https://github.com/loadsys/loadsys_codesniffer" }, "require": { - "squizlabs/php_codesniffer": "2.*", - "cakephp/cakephp-codesniffer": "^2.0.4" + "squizlabs/php_codesniffer": "~2.3", + "cakephp/cakephp-codesniffer": "^2.0.4", + "loadsys/composer-plugins": "~1.0" }, "require-dev": { - "phpunit/phpunit": "4.1.*" + "phpunit/phpunit": "~4.1" }, "license": "MIT", "authors": [ diff --git a/snifftests/TestHelper.php b/snifftests/TestHelper.php index 871ee49..fd42210 100644 --- a/snifftests/TestHelper.php +++ b/snifftests/TestHelper.php @@ -99,6 +99,16 @@ public function runPhpCs($file) { return $result; } + /** + * Asks the phpcs runtime for a list of code sniffs it knows about. + * + * Returns an array of `Vendor.Sniff.Rule` elements that match those + * returned by `phpcs -s`. Used as a "meta" test in LoadsysStandardTest + * to check which sniffs are covered by the sample files and which + * aren't. + * + * @return array Comprehensive list of code sniffs the phpcs runtime knows about. + */ public function sniffList() { if (!class_exists('PHP_CodeSniffer')) { $composerInstall = dirname(dirname(dirname(__FILE__))) . '/vendor/squizlabs/php_codesniffer/CodeSniffer.php';