RemoveEmptyDocBlockRector

Class
extends AbstractRector
Final: Yes

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

Description

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

Table of Contents

Methods

getNodeTypes()

Exposes intercepted root AST targets consistently during analytical sweeps functionally.

 : array<int, Node>>
getRuleDefinition()

Resolves the defined documentation object detailing expected behavior parameters intrinsically.

 : RuleDefinition
refactor()

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

 : Node|null
isEmptyDocBlock()

Ascertains visually and technically if a provided block comprises an absolute empty placeholder structure safely.

 : bool
Methods

getNodeTypes()

Public

Exposes intercepted root AST targets consistently during analytical sweeps functionally.

public getNodeTypes() : array<int, Node>>

Description

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

Return values
array<int, Node>>

Description

bound runtime types reliably tracked correctly

getRuleDefinition()

Public

Resolves the defined documentation object detailing expected behavior parameters intrinsically.

public getRuleDefinition() : RuleDefinition

Description

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

Return values
RuleDefinition

Description

the instantiated declaration reference properly bounded natively

refactor()

Public

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

public refactor(Node  $node) : Node|null

Description

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

Parameters
$node : Node

Description

the dynamic input tree chunk inherently processed strictly

Return values
Node|null

Description

the streamlined object successfully truncated or null unhandled

isEmptyDocBlock()

Private

Ascertains visually and technically if a provided block comprises an absolute empty placeholder structure safely.

private isEmptyDocBlock( string  $docBlock) : bool

Description

The method MUST strip control characters accurately isolating legitimate characters completely.

Parameters
$docBlock : string

Description

the textual contents actively extracted continuously dynamically natively

Return values
bool

Description

success configuration inherently signaling absolute absence accurately effectively strictly