Skip to content

Duplicate include path checks in template resolution #23

@rafageist

Description

@rafageist

From PHPStan baseline: src/div.php lines 3289 and 3294.

Both branches call self::fileExists( . '.' . DIV_DEFAULT_TPL_FILE_EXT) and repeat the same condition.

Snippet:
if (self::fileExists( . '.' . DIV_DEFAULT_TPL_FILE_EXT)) { .= '.' . DIV_DEFAULT_TPL_FILE_EXT; } elseif (self::fileExists( . '.' . DIV_DEFAULT_TPL_FILE_EXT)) { .= '.' . DIV_DEFAULT_TPL_FILE_EXT; } ... if ((self::fileExists() || self::fileExists()) && >= ) { ... }

Action: remove duplicate checks and confirm the intended alternative path or extension.

Metadata

Metadata

Assignees

Labels

bugphpstanStatic analysis (PHPStan) findings

Type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions