My stupid rule to avoid method declaration

Noncompliant Code Example

TO DO 

Compliant Solution

TO DO