TAG ARCHIVE
Everything on refactoring.
3 articles tagged refactoring, sorted newest first.
laravel
Refactor Messy Conditionals with Laravel's Pipeline Facade
That forty-line filter() method full of nested ifs? Laravel's Pipeline facade turns it into small, swappable, individually testable stages — with a worked query-filter example.
7 min read →
php
First-Class Callable Syntax for Cleaner Laravel Collection Pipelines
Turn any method into a Closure with a trailing (...) for cleaner Laravel collection pipelines — and dodge the map() arity trap that silently corrupts your output.
6 min read →
php
Stop Looping: array_find, array_any and array_all in PHP 8.4
PHP 8.4 adds array_find, array_find_key, array_any and array_all — the readable way to search arrays and retire foreach-with-flag loops.
6 min read →