← Home ← Codex ← DEBT
Browse by Category
+ added · updated 7d
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
Cohesion
The degree to which elements within a module belong together; high cohesion means a class does one thing and does it well.
3mo ago quality intermediate
Command Pattern PHP 5.0+
Encapsulates a request as an object, enabling queuing, logging, undo/redo, and decoupling of request sender from receiver.
3mo ago quality intermediate
Command Query Separation (CQS)
Methods should either return a value (query) or change state (command), but never both.
3mo ago quality intermediate
Composite Pattern
Treats individual objects and compositions of objects uniformly through a shared interface, enabling tree-structured hierarchies.
3mo ago quality intermediate
Composition Over Inheritance 🧠 1
Favour assembling behaviour from injected collaborator objects rather than inheriting it from a parent class.
3mo ago quality intermediate
Coupling
The degree to which one module depends on another; high coupling makes changes expensive and testing difficult.
3mo ago quality intermediate
Cyclomatic Complexity 🧠 3
A count of linearly independent paths through a function — each if, for, while, case, and && adds 1.
3mo ago quality intermediate
Data Clump
The same group of variables appearing together repeatedly — a signal they belong in a class together.
3mo ago quality intermediate
Data Transfer Object (DTO) PHP 8.0+
A simple object that carries data between layers or systems with no business logic — reducing coupling between layers and making data contracts explicit.
3mo ago quality intermediate
Dead Code Detection PHP 7.1+
Identifying code that can never be executed — unreachable branches, always-true conditions, unused variables — via static analysis or coverage reports.
3mo ago quality intermediate
Defensive Programming
Writing code that anticipates and handles invalid inputs, unexpected states, and failures gracefully.
3mo ago quality intermediate
Divergent Change
One class changes for many different reasons — a sign it has too many responsibilities.
3mo ago quality intermediate
Fan-In / Fan-Out
Fan-in measures how many modules call a given module; fan-out measures how many modules it calls — high fan-out indicates high coupling.
3mo ago quality intermediate
Feature Envy PHP 5.0+
A method that accesses the data of another class more than its own — suggesting it belongs in that other class.
3mo ago quality intermediate
Fixing Primitive Obsession with Value Objects
Replacing raw strings, ints, and floats representing domain concepts with dedicated Value Object classes that enforce invariants at construction.
3mo ago quality intermediate
God Class PHP 5.0+
A class that knows too much and does too much — violating the Single Responsibility Principle.
3mo ago quality intermediate
Inappropriate Intimacy
Two classes that access each other's private fields and internals too freely, creating tight bidirectional coupling.
3mo ago quality intermediate
Interface Segregation Principle
Clients should not be forced to depend on interfaces they do not use — prefer many small, focused interfaces over one large one.
3mo ago quality intermediate
Iterator Pattern PHP 5.0+
Provides a uniform way to traverse a collection without exposing its internal structure — the foundation of PHP's foreach and SPL iterators.
3mo ago quality intermediate
Law of Demeter
A design guideline: a method should only call methods on itself, its parameters, objects it creates, and its direct fields.
3mo ago quality intermediate
✓ schema.org compliant