Use features of PHP 7.2
sad-spirit opened this issue · comments
- Change read-only arrays to constants (e.g.
Lexer::$keywords
) - Some methods that accept arrays can accept
(...$stuff)
(e.g.new QualifiedName('foo', 'bar')
rather thannew QualifiedName(['foo', 'bar'])
) - Use traits (e.g. several leaf
Node
s share the samesetParentNode()
implementation) - Binary numbers for
Token
constants
And the obvious: strict_types
, scalar type hints, types for return values