PHPDoc should contain @param
for all params.
Whether to add missing @param
annotations for untyped parameters only.
Allowed types: bool
Default value: true
Default configuration.
--- Original
+++ New
<?php
/**
* @param int $bar
+ * @param mixed $baz
*
* @return void
*/
function f9(string $foo, $bar, $baz) {}
With configuration: ['only_untyped' => true]
.
--- Original
+++ New
<?php
/**
* @param int $bar
+ * @param mixed $baz
*
* @return void
*/
function f9(string $foo, $bar, $baz) {}
With configuration: ['only_untyped' => false]
.
--- Original
+++ New
<?php
/**
* @param int $bar
+ * @param string $foo
+ * @param mixed $baz
*
* @return void
*/
function f9(string $foo, $bar, $baz) {}
The rule is part of the following rule set:
PhpCsFixer\Fixer\Phpdoc\PhpdocAddMissingParamAnnotationFixer