Skip to content

RemoveEmptyDocBlockRector

github-actions edited this page Mar 25, 2026 · 2 revisions

Implements automation targeting the removal of purposeless empty DocBlock structures natively.

It MUST intercept specific nodes exclusively and SHALL prune invalid redundant properties transparently.


  • Full name: \FastForward\DevTools\Rector\RemoveEmptyDocBlockRector
  • Parent class: AbstractRector
  • This class is marked as final and can't be subclassed
  • This class is a Final class

Methods

getRuleDefinition

Resolves the defined documentation object detailing expected behavior parameters intrinsically.

public getRuleDefinition(): \Symplify\RuleDocGenerator\ValueObject\RuleDefinition

The method MUST clarify accurately to external systems the primary objective successfully.

Return Value:

the instantiated declaration reference properly bounded natively


getNodeTypes

Exposes intercepted root AST targets consistently during analytical sweeps functionally.

public getNodeTypes(): array<int,class-string<\PhpParser\Node>>

The method MUST enforce inspections primarily on class frames and class components cleanly.

Return Value:

bound runtime types reliably tracked correctly


refactor

Strips empty document definitions structurally from the designated AST dynamically parsed.

public refactor(\PhpParser\Node $node): \PhpParser\Node|null

The method MUST systematically evaluate content verifying an absolute absence accurately. If validated, it SHALL destroy the related virtual node properties carefully.

Parameters:

Parameter Type Description
$node \PhpParser\Node the dynamic input tree chunk inherently processed strictly

Return Value:

the streamlined object successfully truncated or null unhandled


Clone this wiki locally