diff --git a/lib/Doctrine/ruleset.xml b/lib/Doctrine/ruleset.xml index ca9e6c88..4f5d46f9 100644 --- a/lib/Doctrine/ruleset.xml +++ b/lib/Doctrine/ruleset.xml @@ -202,7 +202,9 @@ @runTestsInSeparateProcesses, @see, @Target, - @throws + @test, + @throws, + @uses " /> diff --git a/tests/expected_report.txt b/tests/expected_report.txt index 9f7a757f..3d031c41 100644 --- a/tests/expected_report.txt +++ b/tests/expected_report.txt @@ -4,14 +4,15 @@ PHP CODE SNIFFER REPORT SUMMARY FILE ERRORS WARNINGS ---------------------------------------------------------------------- tests/input/concatenation_spacing.php 24 0 -tests/input/example-class.php 18 0 +tests/input/example-class.php 19 0 tests/input/not_spacing.php 7 0 tests/input/return_type_on_closures.php 21 0 tests/input/return_type_on_methods.php 17 0 +tests/input/test-case.php 6 0 ---------------------------------------------------------------------- -A TOTAL OF 87 ERRORS AND 0 WARNINGS WERE FOUND IN 5 FILES +A TOTAL OF 94 ERRORS AND 0 WARNINGS WERE FOUND IN 6 FILES ---------------------------------------------------------------------- -PHPCBF CAN FIX 77 OF THESE SNIFF VIOLATIONS AUTOMATICALLY +PHPCBF CAN FIX 83 OF THESE SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- diff --git a/tests/fixed/example-class.php b/tests/fixed/example-class.php index 64932bfa..b320be9d 100644 --- a/tests/fixed/example-class.php +++ b/tests/fixed/example-class.php @@ -5,6 +5,7 @@ namespace Example; use Doctrine\Sniffs\Spacing\ControlStructureSniff; +use Fancy\TestCase; use const PHP_MINOR_VERSION; use const PHP_RELEASE_VERSION as PHP_PATCH_VERSION; use const PHP_VERSION; @@ -74,4 +75,9 @@ public static function getMinorVersion() : int { return self::VERSION; } + + public static function getTestCase() : TestCase + { + return new TestCase(); + } } diff --git a/tests/fixed/test-case.php b/tests/fixed/test-case.php new file mode 100644 index 00000000..fb9a3354 --- /dev/null +++ b/tests/fixed/test-case.php @@ -0,0 +1,39 @@ +