Handle `\true`/`\false`/`\null` in the new namespaced names tokenization
Description
Follow up on #1020.
In the PHPCS codebase, there are only a couple more places were the T_TRUE, T_FALSE and T_NULL tokens are checked for.
In most cases, this involves checking for/skipping over type declarations, and as the token arrays containing the valid tokens for types will already include the T_NAME_FULLY_QUALIFIED token, no changes are needed there.
Aside from that, there are three sniffs which could be considered "broken" for FQN true/false/null. These are fixed in this PR.
Tokenizer/PHP: document handling of \true/\false/\null
The handling as documented here is 100% in line with the way PHP 8.0+ handles this natively.
Tokenizer/PHP: add more tests with FQN true/false/null
This is already handled correctly in all relevant places, these tests just safeguard that.
Generic/UnconditionalIfStatement: handle FQN true/false/null
This sniff checks for if/elseif which only contain "true" or "false", i.e. don't actually compare to anything.
This commit fixes the sniff to still function correctly when it encounters "fully qualified true/false" after the merge of #1020.
Includes tests.
Generic/DisallowYodaConditions: handle FQN true/false/null
This commit fixes the sniff to handle "fully qualified true/false" the same as unqualified true/false after the merge of #1020.
Includes tests.
Generic/[Lower|Upper]CaseConstant: minor clean up
The PHP 8.0 namespaced name tokens were already added to the sniff in PR 119 (to make the merge with the old 4.0 branch easier).
This commit now removes the T_NS_SEPARATOR and T_NAMESPACE tokens which should no longer need to be taken into account what with the change in the namespaced names tokenization in PHPCS 4.0.
The change is already covered by pre-existing tests.
Generic/[Lower|Upper]CaseConstant: handle FQN true/false/null
These are the only two sniffs explicitly targetting true, false and null.
This commit allows these sniffs to still function correctly on "fully qualified true/false/null" after the merge of #1020.
Includes tests.
Squiz/ComparisonOperatorUsage: handle FQN true/false/null
This commit fixes the sniff to handle "fully qualified true/false" the same as unqualified true/false after the merge of #1020.
Includes tests.
PSR12/NullableTypeDeclaration: add tests with FQN true/false/null
The sniff already handles this correctly.
Squiz/VariableComment: add tests with FQN true/false/null
The sniff already handles finding the docblock correctly, even when confronted with these types.
Suggested changelog entry
N/A This is covered by the changelog entry for PR #1020