Skip to content

refactor: remove unnecessary leading backslash from Http facade calls…#42

Open
knit-pay wants to merge 1 commit into
Nafezly:masterfrom
knit-pay:master
Open

refactor: remove unnecessary leading backslash from Http facade calls…#42
knit-pay wants to merge 1 commit into
Nafezly:masterfrom
knit-pay:master

Conversation

@knit-pay

Copy link
Copy Markdown

… in payment classes

Problem:
Several gateway classes were using \Http:: with a leading backslash, while the same files already imported the facade via
'use Illuminate\Support\Facades\Http;'. This is inconsistent and redundant.

Impact on non-Laravel frameworks:
The leading backslash forces PHP to resolve \Http in the global namespace, which breaks usage in environments (e.g. WordPress, Symfony, CodeIgniter) that register Illuminate\Support\Facades\Http but do NOT alias it globally as \Http.

Changes:

  • Replaced all \Http:: occurrences with Http:: in 15 gateway files.
  • All affected files already have the proper 'use' import, so this is a zero-breaking change for existing Laravel users.

Benefits:

  • Improves code consistency within the codebase.
  • Increases portability to non-Laravel frameworks.
  • Reduces dependency on global class aliases.

… in payment classes

Problem:
Several gateway classes were using \\Http:: with a leading backslash, while
the same files already imported the facade via
'use Illuminate\Support\Facades\Http;'. This is inconsistent and redundant.

Impact on non-Laravel frameworks:
The leading backslash forces PHP to resolve \Http in the global namespace,
which breaks usage in environments (e.g. WordPress, Symfony, CodeIgniter)
that register Illuminate\Support\Facades\Http but do NOT alias it globally
as \Http.

Changes:
- Replaced all \\Http:: occurrences with Http:: in 15 gateway files.
- All affected files already have the proper 'use' import, so this is a
  zero-breaking change for existing Laravel users.

Benefits:
- Improves code consistency within the codebase.
- Increases portability to non-Laravel frameworks.
- Reduces dependency on global class aliases.
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.

1 participant