Move defines to their own file
commit46028c4c32caf8dfc675f5544a037bd5e5d8f9c2
authorAndreas Gohr <andi@splitbrain.org>
Thu, 4 Jun 2020 06:22:16 +0000 (4 08:22 +0200)
committerAndreas Gohr <andi@splitbrain.org>
Thu, 4 Jun 2020 06:22:16 +0000 (4 08:22 +0200)
tree16d6d00499ac88fad906e0f3625ee0f1e6b7835d
parente3ec9ced0473ba3900d414d29ad9a4329e834aef
Move defines to their own file

As described in
https://github.com/dwp-forge/columns/issues/5#issuecomment-638467603
sometime the Lexer constants have not been (auto)loaded when a syntax plugin
is invoked (I'm not sure why).

In general PSR2 discourages a mix of main code and function/class setup
with the call to define() being considered main code.

This patch moves these the define calls to a separate new file, solving
both of the above problems.

These are not all our defines. Instead I focused on the ones that are
ENUM-like.

In the future we should think about what defines can be replaced by
class constants and what other define() calls should be moved.
inc/Parsing/Lexer/Lexer.php
inc/auth.php
inc/changelog.php
inc/common.php
inc/defines.php [new file with mode: 0644]
inc/infoutils.php
inc/load.php
inc/media.php