Style terms
Consistency, readability, and the rules that make teams sane
Coding style is not about aesthetics — it is about communication. Consistent formatting, naming conventions, linting rules, and documentation standards reduce cognitive load and make code reviews faster and less painful. This category covers the conventions and tooling that help teams write code that reads as if one thoughtful person wrote it all.
Branch Naming Conventions
Consistent branch names using type/description patterns — making branch purpose immediately clear and enabling automation based on branch name prefixes.
2mo 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.
2mo ago
style beginner
Code Documentation Standards PHP 5.0+
When, what, and how to document — the right balance between self-documenting code and explicit documentation for APIs, non-obvious decisions, and complex algorithms.
2mo 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.
2mo 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.
2mo 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.
2mo 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.
2mo 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.
2mo 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.
2mo 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.
2mo 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.
2mo 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.
2mo 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.
2mo 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.
2mo 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.
2mo 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.
2mo ago
style beginner
Conventional Commits
A commit message specification — type(scope): description — enabling automated changelogs, semantic versioning, and machine-readable history.
2mo ago
style beginner
Deep Nesting PHP 5.0+
Code indented 3+ levels deep — guard clauses and early returns can flatten most deep nesting.
2mo 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.
2mo ago
style beginner
Fluent Naming for Boolean Methods
Prefix boolean-returning methods with is, has, can, should, or was so conditionals read as natural English sentences.
2mo ago
style beginner