-
Notifications
You must be signed in to change notification settings - Fork 0
AddMissingMethodPhpDocRector
Executes AST inspections parsing missing documentation on methods automatically.
It MUST append @param, @return, and @throws tags where deduced accurately.
The logic SHALL NOT override existing documentation.
- Full name:
\FastForward\DevTools\Rector\AddMissingMethodPhpDocRector - Parent class:
AbstractRector - This class is marked as final and can't be subclassed
- This class is a Final class
Delivers the formal rule description configured within the Rector ecosystem.
public getRuleDefinition(): \Symplify\RuleDocGenerator\ValueObject\RuleDefinitionThe method MUST accurately describe its functional changes logically.
Return Value:
explains the rule's active behavior context
Designates the primary Abstract Syntax Tree (AST) node structures intercepted.
public getNodeTypes(): array<int,class-string<\PhpParser\Node>>The method MUST register solely ClassMethod class references to guarantee precision.
Return Value:
the structural bindings applicable for this modification
Computes necessary PHPDoc metadata for a given class method selectively.
public refactor(\PhpParser\Node $node): \PhpParser\NodeThe method MUST identify the missing @param, @return, and @throws tags algorithmically.
It SHALL preserve pre-existing valid tags cleanly. If no augmentation is achieved, it returns the node unaltered.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$node |
\PhpParser\Node | the target method representation parsed synchronously |
Return Value:
the refined active syntax instance inclusive of generated documentation