Back

LL097

Feature envy

Object Pascal — Delphi & Free Pascal
Info
Design

A method heavily accessing another object's members likely belongs on that object

a method heavily accessing another object's members likely belongs on that object.

Why this severity

a method heavily accessing another object's members likely belongs on that object.


Known false positives

mapping or adapter methods that intentionally bridge two objects.

Remediation example

// Move CalculateTotal to TOrder:
function TOrder.CalculateTotal: Currency;
begin
  Result := Price * Quantity;
end;

Reconnecting… Connection lost. Reload