jrfnl/Debug-Bar-Constants — pull request #1 by goatherd (2013-09-10 10:32:07+00:00)
Title: cleanup

Great plugin (and above average code quality! Would be nice to see that more often).

Just some cleanup/ nitpicking, nothing important.

Some coding standard things:
* no blank line before `else`
* `elseif` instead of `else if`
* missing blank lines

Some minor performance optimisation:
* `isset()` and `===`-like comparisions are faster than function calls
- `count($array) > 0` is the same as `$array !== array()` once you know that `is_array($array) === true`
- `is_null` is intended as callback. use `=== null` or `! isset()`
* &-operator is not needed for objects (`$this` is always passed by reference; since PHP 5 at least)
* `unset()` did not have benefit for most usages:
- indeed it will safe a fraction of a KB memory usage but that is not worth it
- it will slow down execution
- variables that are replaced do not need to be unset explicitly
- function scope variables are unset automatically