← 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
Loop Style Preferences PHP 7.4+
Choose the clearest loop construct for the job: foreach for collections, for with index when position matters, while for condition-driven iteration.
1mo ago Style beginner
Branch Naming Conventions
Consistent branch names using type/description patterns — making branch purpose immediately clear and enabling automation based on branch name prefixes.
3mo ago Style beginner
Class Naming Convention PHP 5.0+
PHP classes must use PascalCase (UpperCamelCase) per PSR-1 — each word capitalised, no underscores, descriptive nouns or noun phrases.
3mo ago Style beginner
Code Documentation Standards PHP 5.0+ 🧠 1
When, what, and how to document — the right balance between self-documenting code and explicit documentation for APIs, non-obvious decisions, and complex algorithms.
3mo ago Style beginner
Commit Message Best Practices
Clear commit messages that explain why a change was made, not just what — enabling efficient git log navigation, automated changelog generation, and informed code archaeology.
3mo ago Style beginner
Elvis Operator Not Used PHP 5.3+
Writing $x ? $x : $y instead of $x ?: $y — the Elvis operator (?:) returns the left operand if truthy, otherwise the right, eliminating the repeated expression.
3mo ago Style beginner
Excessive Blank Lines PHP 5.0+
Multiple consecutive blank lines within a function or between statements — adding visual noise without improving readability.
3mo ago Style beginner
Function & Method Naming Convention
PHP functions and methods use camelCase per PSR-1 — lowercase first word, each subsequent word capitalised, verb-noun pairs for actions.
3mo ago Style beginner
Inconsistent Indentation
Mixing tabs and spaces, or using varying numbers of spaces for indentation — causes visual misalignment across editors and makes diffs noisy.
3mo ago Style beginner
Lines Too Long
Lines exceeding 120 characters force horizontal scrolling and break side-by-side diff views — PSR-12 recommends a soft limit of 120 and hard limit of no limit, but team conventions often enforce 120.
3mo ago Style beginner
Missing Class Comments PHP 5.0+
A class without a PHPDoc block lacks the docblock description, @package annotation, and context needed for IDE tooling, generated documentation, and new developers.
3mo ago Style beginner
Missing Function Comments PHP 5.0+
Functions without PHPDoc lose IDE parameter hints, inline documentation, and the opportunity to explain non-obvious behaviour, preconditions, and edge cases.
3mo ago Style beginner
Null Coalescing Operator Not Used PHP 7.0+
Using isset() + ternary or if/else chains when the null coalescing operator (??) or null coalescing assignment (??=) would be cleaner and more idiomatic.
3mo ago Style beginner
Pull Request Description Templates
Structured PR templates in .github/PULL_REQUEST_TEMPLATE.md that prompt authors for context, testing evidence, and checklists — improving review quality and reducing reviewer cognitive load.
3mo ago Style beginner
.gitignore for PHP Projects PHP 5.0+
A well-structured PHP .gitignore excludes vendor/, generated files, IDE configs, .env secrets, and OS artifacts from version control.
3mo ago Style beginner
Boolean Parameters (Flag Arguments Smell)
A boolean parameter that switches a function between two different behaviours — a sign the function should be split into two.
3mo ago Style beginner
CHANGELOG — Keeping a Good One
A human-readable log of notable changes per release — distinct from git commit history — following Keep a Changelog conventions.
3mo ago Style beginner
Conventional Commits 🧠 1
A commit message specification — type(scope): description — enabling automated changelogs, semantic versioning, and machine-readable history.
3mo ago Style beginner
Deep Nesting PHP 5.0+ 🧠 5
Code indented 3+ levels deep — guard clauses and early returns can flatten most deep nesting.
3mo ago Style beginner
EditorConfig for PHP Projects
A .editorconfig file enforces consistent indentation, line endings, and charset across all editors without relying on individual developer setup.
3mo ago Style beginner
✓ schema.org compliant