← Home ← Codex ← DEBT
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
Code Readability Metrics
Readability can be measured — cyclomatic complexity, cognitive complexity (SonarQube), lines per function, parameter count, and nesting depth are all quantifiable proxies for readability.
2mo ago quality intermediate
Diagram: Chain of Responsibility Pattern Chain of Responsibility Pattern PHP 5.0+
Passes a request along a chain of handlers, each deciding whether to process it or pass it to the next handler.
3mo ago quality intermediate
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
Cognitive Complexity 🧠 4
A readability-focused complexity metric that penalises nesting more heavily than cyclomatic complexity.
3mo ago quality intermediate
✓ schema.org compliant