Rule phpdoc_no_duplicate_types¶
Removes duplicate PHPDoc types.
Examples¶
Example #1¶
--- Original
+++ New
<?php
/**
- * @param string|string|int $bar
+ * @param string|int $bar
*/
Rule sets¶
The rule is part of the following rule set:
References¶
Fixer class: PhpCsFixer\Fixer\Phpdoc\PhpdocNoDuplicateTypesFixer
Test class: PhpCsFixer\Tests\Fixer\Phpdoc\PhpdocNoDuplicateTypesFixerTest
The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.