-
Notifications
You must be signed in to change notification settings - Fork 4
Conditional tag ignore suffix logic (empty() always false) #22
Copy link
Copy link
Open
Labels
phpstanStatic analysis (PHPStan) findingsStatic analysis (PHPStan) findings
Description
From PHPStan baseline: src/div.php lines 1977-2005.
Issues:
- empty(DIV_TAG_CONDITIONAL_*_SUFFIX) is always false/true per PHPStan.
- Subsequent === false checks on $tag_*_ignore become impossible branches.
Snippet:
= empty(DIV_TAG_CONDITIONAL_TRUE_BEGIN_SUFFIX) ? DIV_TAG_CONDITIONAL_TRUE_BEGIN_PREFIX . . DIV_TAG_VAR_MEMBER_DELIMITER : false; = empty(DIV_TAG_CONDITIONAL_TRUE_END_SUFFIX) ? DIV_TAG_CONDITIONAL_TRUE_END_PREFIX . . DIV_TAG_VAR_MEMBER_DELIMITER : false; ... if ( !== false) { ... }
Action: confirm whether these DIV_TAG_* suffixes can be empty; if not, simplify/remove the dead branches or adjust to a runtime-configured value.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
phpstanStatic analysis (PHPStan) findingsStatic analysis (PHPStan) findings
Type
Projects
Status
Todo