Category Archives: PHP Code Smells

The Sky. The Universe. The Missing Unit Tests

Out there in the Universe. Now comparisons get Epic Pictures when it comes to WordPress and Unit Tests: Beta Sagittae. via The Loop. Reminded me of Development By The Numbers – Slides (May 2013; by ircmaxell) having also nice comparisons … Continue reading

Posted in Code Smells, Hacking The Core, Linked, PHP Code Smells, Pressed | Tagged , , , , , | Leave a comment

The Daily Mistake: Not to Proxy Remote Services

“Just gimme a min, I glue that HTTP based remote service in.” – Whether the standard file_get_contents + Json *bam* or complete SOAP, a developer should have the time to wrap each (remote) data-source inside it’s own interface that is … Continue reading

Advertisement

Posted in Code Smells, PHP Code Smells, PHP Development, Pressed, Surviving the Internet | Tagged , , , , , , , , , , , | 3 Comments

List of PHPMD Rulesets

As I use PHPMD from time to time only (but more and more often) I needed to lookup the default ruleset names from the filesystem. As google is faster than a search on the harddrive, here they are for future … Continue reading

Posted in PHP Code Smells, PHP Development, PHP Development, Pressed, Tools, Uncategorized | Tagged , , | 4 Comments

PHP: Curly Brackets Substring Access

I just have another lighter PHP specific Code Smell: Curly Brackets Substring Access. If you’re coding PHP since a longer time you might not only know but also have used curly brackets for index-/char-based substring access.

Posted in Code Smells, Hacking The Core, PHP Code Smells | Tagged , , , , , , | 2 Comments

Prevent Code Injection in PHP include files

While discussing Coding Standards it was not long ago I argued against adding ?> at the end of php files. But miqrogroove pointed to me an interesting aspect why it actually can make sense to have it and an additional … Continue reading

Posted in Code Smells, Hakre's Tips, PHP Code Smells, Pressed | Tagged , , , , , | Leave a comment