Fix: Remove redundant function_exists check in checkNodePath#9
Closed
google-labs-jules[bot] wants to merge 1 commit intomainfrom
Closed
Fix: Remove redundant function_exists check in checkNodePath#9google-labs-jules[bot] wants to merge 1 commit intomainfrom
google-labs-jules[bot] wants to merge 1 commit intomainfrom
Conversation
The `checkNodePath` method contained a `function_exists` check for `str_end_with`, which is a typo for the `str_ends_with` function. The fallback `substr_compare` was always being used. This commit refactors the check to use `str_ends_with()` directly, which is available in PHP 8.0+ and simplifies the code. This also addresses the user's request to remove the redundant check.
Author
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll acknowledge your comments with a 👀 emoji and then get to work. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! I will automatically address your feedback. For any comments you don't want me to act on, just include (aside). For security, I will only act on instructions from the user who triggered this task for this pull request. |
Minimum allowed line rate is |
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.
This pull request addresses a small performance optimization by removing a redundant
function_existscheck in theXmlProcessor::checkNodePathmethod. The original code had a typo (str_end_withinstead ofstr_ends_with) and was falling back tosubstr_compare. The code has been simplified to usestr_ends_with()directly, improving readability and removing the unnecessary check.PR created automatically by Jules for task 13754263547782446615