← CodeClarityLab Home
Browse by Category
+ added · updated 7d
✕ Clear A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Method Chaining Pitfalls & Alternatives
Method chaining (fluent interfaces) improves readability for builders but creates debugging difficulties, encourages temporal coupling, and can hide null returns.
2mo ago quality intermediate
Memento Pattern PHP 5.0+
A behavioural pattern that captures an object's internal state and stores it externally so it can be restored later — enabling undo, snapshots, and versioning without exposing internals.
2mo ago quality intermediate
Missing Return Type Declarations PHP 7.0+
Functions without declared return types lose static analysis coverage, allow type confusion bugs, and make code harder to understand without reading the implementation.
2mo ago quality beginner
Maintainability Index
A composite metric (0–100) combining Halstead volume, cyclomatic complexity, and lines of code to estimate how easy code is to maintain.
2mo ago quality intermediate
Mediator Pattern PHP 5.0+
Centralises complex communications between multiple objects into a single mediator object, reducing direct dependencies between colleagues.
2mo ago quality intermediate
Message Chains
A long chain of method calls ($a->getB()->getC()->getD()) that tightly couples code to the internal structure of multiple objects.
2mo ago quality intermediate
Middle Man
A class that does little more than delegate every method to another object — an unnecessary layer of indirection.
2mo ago quality intermediate
Magic Number PHP 5.0+
A numeric literal with no explanation — its meaning is unclear without context, harming readability and maintainability.
2mo ago quality beginner
✓ schema.org compliant