Remove unnecessary defined('ENVIRONMENT') checks

As suggested in issue #2134 & PR #2149
12 files changed