Skip to content

Conversation

@Lukasz032
Copy link

@Lukasz032 Lukasz032 commented Aug 12, 2025

Template file:

  • line 7, phpdoc comment: defined $variables as an associative array (builtin include() infers context, so parent's $variables is visible here).
  • line 12: isset($x) && $x can be always shortened as !empty($x) + actually used parent context's $variables to access what we need
  • lines 18 and 22: ditto

Also, since extract is now unnecessary, I've removed it from the Helper class.

Fixes: #260

Copy link
Member

@Pathan-Amaankhan Pathan-Amaankhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Lukasz032,

Thanks for the PR 🙌.

Before we proceed with the review, we’d really appreciate it if you could add appropriate spacing to align with the WordPress PHP Coding Standards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not use extract() in src/Utils/Helper.php

2 participants