Source: localheinz.com

Avoiding one-liners in PHP
PHP developers frequently share how they transform multiple lines of PHP code into one-liners. After all, writing PHP code is not a problem, but maintaining it is even more so.

Code coverage will decrease when you delete tests you reformat tested production code from more to fewer executable lines (one-liners, anyone?) you add untested code you reformat untested production code from fewer to more executable lines Code coverage will increase when you add tests you reformat tested production code from fewer to more executable lines you deleted untested production code you reformat untested production code from more to fewer executable lines (one-liners, anyone?) By using clever one-liners in your production code, you can gain misleadingly high confidence in your production code and your safety net of automated tests.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners