commit fa76f65209a4cb4c0da2e144935bad7919d94951 Author: Matthew Brown Date: Wed Nov 14 00:36:33 2018 -0500 Add starter files for PHPUnit Plugin diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..3292221 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/vendor/ +composer.lock +vendor diff --git a/Plugin.php b/Plugin.php new file mode 100755 index 0000000..4d9f474 --- /dev/null +++ b/Plugin.php @@ -0,0 +1,15 @@ +addStubFile(__DIR__ . '/stubs/TestCase.php'); + } +} diff --git a/composer.json b/composer.json new file mode 100755 index 0000000..e93ef90 --- /dev/null +++ b/composer.json @@ -0,0 +1,37 @@ +{ + "name": "psalm/phpunit-plugin", + "description": "Psalm plugin for PHPUnit", + "type": "psalm-plugin", + "license": "MIT", + "authors": [ + { + "name": "Matt Brown", + "email": "github@muglug.com" + } + ], + "require": { + "vimeo/psalm": "dev-master" + }, + "require-dev": { + "phpunit/phpunit": "^7.2", + "squizlabs/php_codesniffer": "^3.3" + }, + "extra": { + "pluginClass": "Psalm\\PhpUnitPlugin\\Plugin" + }, + "autoload": { + "psr-4": { + "Psalm\\PhpUnitPlugin\\": ["."] + } + }, + "scripts" : { + "check": [ + "@cs-check", + "@test", + "@analyze" + ], + "analyze": "psalm", + "cs-check": "phpcs", + "cs-fix": "phpcbf" + } +} diff --git a/phpcs.xml.dist b/phpcs.xml.dist new file mode 100755 index 0000000..3ca3171 --- /dev/null +++ b/phpcs.xml.dist @@ -0,0 +1,30 @@ + + + + + + + + Plugin.php + + + + + + + + + + + + + + + + + + + + + + diff --git a/psalm.xml.dist b/psalm.xml.dist new file mode 100755 index 0000000..a2f3ff1 --- /dev/null +++ b/psalm.xml.dist @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/stubs/TestCase.php b/stubs/TestCase.php new file mode 100644 index 0000000..11cef12 --- /dev/null +++ b/stubs/TestCase.php @@ -0,0 +1,104 @@ +