← CodeClarityLab Home
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
Simplifying Complex Conditional Logic
Complex conditionals can be simplified with De Morgan's laws, guard clauses, decomposing into named predicates, and consolidating duplicate conditions.
2mo ago style intermediate
Git Hooks in PHP Workflow PHP 5.0+
Using pre-commit hooks to automatically run PHP-CS-Fixer, PHPStan, and security checks before every commit — preventing style violations and bugs from entering the repository.
2mo ago style intermediate
PHPCS + PHPStan in CI (Workflow Guide) PHP 5.0+
Running PHP_CodeSniffer for style and PHPStan for type/logic errors as separate CI steps — each catching a distinct class of problem.
2mo ago style intermediate
PHPStan Levels 0–9 Explained PHP 7.1+
PHPStan's 10 strictness levels — from basic undefined variable checks (0) to full generic type inference and strict mixed handling (9).
2mo ago style intermediate
Psalm Type Annotations PHP 7.1+
Psalm's docblock annotations — @param, @return, @template, @psalm-type — extend PHP's native type system to express generics, aliases, and complex types.
2mo ago style intermediate
PSR-11: Container Interface PHP 5.3+
A standard ContainerInterface with get() and has() enabling framework-agnostic service resolution from any PSR-11-compliant DI container.
2mo ago style intermediate
PSR-14: Event Dispatcher PHP 7.2+
Standard EventDispatcherInterface and ListenerProviderInterface for framework-agnostic event dispatch and handler registration.
2mo ago style intermediate
PSR-15: HTTP Handlers & Middleware PHP 7.0+
Defines RequestHandlerInterface and MiddlewareInterface for composable, framework-agnostic HTTP middleware pipelines.
2mo ago style intermediate
PSR-17: HTTP Factories PHP 7.1+
Standard factory interfaces for creating PSR-7 HTTP objects — decoupling library code from any specific PSR-7 implementation.
2mo ago style intermediate
PSR-6: Caching Interface PHP 5.5+
Standard CacheItemPoolInterface and CacheItemInterface for framework-agnostic cache integration — decouple code from specific cache backends.
2mo ago style intermediate
PSR-7: HTTP Message Interface PHP 5.3+
Immutable interfaces for HTTP requests and responses, enabling framework-agnostic HTTP handling and middleware composition.
2mo ago style intermediate
Rector — Automated PHP Upgrades & Refactoring PHP 7.1+
Rector applies rule-based AST transformations to upgrade PHP versions, migrate frameworks, and enforce coding patterns — automatically.
2mo ago style intermediate
✓ schema.org compliant