refactor: remove unnecessary leading backslash from Http facade calls…#42
Open
knit-pay wants to merge 1 commit into
Open
refactor: remove unnecessary leading backslash from Http facade calls…#42knit-pay wants to merge 1 commit into
knit-pay wants to merge 1 commit into
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… 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:
Benefits: