Skip to content

[BUG] refactor usage of extract() function to explicit variable assignments #214

@sancheet230

Description

@sancheet230

Describe the bug.

The current implementation utilizes the extract() function to import variables from configuration arrays into the local scope. This practice can inadvertently overwrite existing variables or introduce unexpected behavior, especially if the configuration array contains unanticipated keys. To enhance code clarity and maintainability, it's advisable to replace extract() with explicit variable assignments

Expected behavior

The application should handle configuration data safely and predictably. Variables should be assigned explicitly from configuration arrays to prevent unintended overwrites and ensure clarity in the codebase. This approach enhances maintainability and reduces the risk of introducing hard-to-trace bugs

Screenshots

NA

How to Reproduce

  1. Locate any method within the codebase that utilizes the extract() function to import variables from a configuration array.​

  2. Ensure that the configuration array ($config) contains keys that match existing variable names in the local scope of the method.​

  3. Execute the method and observe the behavior of the application.

🖥️ Device Information [optional]

  • Operating System (OS):
  • Browser:
  • Browser Version:

👀 Have you checked for similar open issues?

  • I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions