This repository was archived by the owner on May 25, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +15
-5
lines changed
Expand file tree Collapse file tree 6 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 22 composer install
33test :
44 vendor/bin/phpunit --color
5+ vendor/bin/phpstan analyze -l7 src tests
56coverage :
67 $(eval TMPDIR=$(shell mktemp -d) )
78 vendor/bin/phpunit --coverage-html=$(TMPDIR )
Original file line number Diff line number Diff line change 1616 },
1717 "require-dev" : {
1818 "phpunit/phpunit" : " ^6.1" ,
19- "php-vfs/php-vfs" : " ^v1.3"
19+ "php-vfs/php-vfs" : " ^v1.3" ,
20+ "phpstan/phpstan" : " ^0.9"
2021 },
2122 "autoload" : {
2223 "psr-4" : {
2324 "DiffSniffer\\ " : " src/"
2425 }
2526 },
27+ "autoload-dev" : {
28+ "psr-4" : {
29+ "DiffSniffer\\ Tests\\ " : " tests/" ,
30+ "PHP_CodeSniffer\\ " : " vendor/squizlabs/php_codesniffer/src/"
31+ }
32+ },
2633 "extra" : {
2734 "branch-alias" : {
2835 "dev-master" : " 3.0.x-dev"
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ private function loadComposerConfig(string $path) : array
8383 */
8484 private function loadPhpCodeSnifferConfig (string $ path ) : array
8585 {
86- $ phpCodeSnifferConfig = null ;
86+ $ phpCodeSnifferConfig = [] ;
8787
8888 require $ path ;
8989
@@ -93,7 +93,7 @@ private function loadPhpCodeSnifferConfig(string $path) : array
9393 /**
9494 * Resolves relative installed paths against the configuration file path
9595 *
96- * @param array Configuration parameters
96+ * @param array $config Configuration parameters
9797 * @param string $configPath Configuration file paths
9898 * @return array Configuration parameters
9999 */
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public function getIterator() : Traversable
5252 new RecursiveArrayIterator (
5353 new EmptyIterator ()
5454 ),
55- null ,
55+ '' ,
5656 $ this ->config ,
5757 $ this ->ruleSet
5858 ));
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class Reporter extends BaseReporter
1414 /**
1515 * @var Diff
1616 */
17- private $ diff = [] ;
17+ private $ diff ;
1818
1919 public function __construct (Diff $ diff , Config $ config )
2020 {
Original file line number Diff line number Diff line change @@ -11,9 +11,11 @@ class RunnerTest extends TestCase
1111{
1212 public function testEarlyReturn ()
1313 {
14+ /** @var Config|\PHPUnit_Framework_MockObject_MockObject $config */
1415 $ config = $ this ->createMock (Config::class);
1516 $ runner = new Runner ($ config );
1617
18+ /** @var Changeset|\PHPUnit_Framework_MockObject_MockObject $changeSet */
1719 $ changeSet = $ this ->createMock (Changeset::class);
1820 $ changeSet ->expects ($ this ->once ())
1921 ->method ('getDiff ' )
You can’t perform that action at this time.
0 commit comments