Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that Fixer::endChangeset() returns the real outcome #375

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Mar 3, 2024

  1. Ensure that endChangeset() returns the real outcome

    I was debugging a complex sniff that implies multiple
    potential modifications to the same token (that is, right now,
    not possible - we could discuss about that another day), when
    have detected that the Fixer::endChangeset() method is returning
    always true, no matter the changes have been not accepted.
    
    So this just ensures that the method returns the real outcome.
    
    I've been looking to current tests to try to add something to
    have it covered, but it seems that the Fixer is one of those
    areas needing some coverage, haven't found any test explicitly
    covering it.
    
    Also, I've searched at github, to see if anybody may be using
    expressions like:
    
    $outcome = $phpcsFile->fixer->endChangeset()...
    if ($phpcsFile->fixer->endChangeset()...
    
    And have found zero lines of code using the return value
    of the method. Hence, I think it's a safe change to apply.
    stronk7 committed Mar 3, 2024
    Configuration menu
    Copy the full SHA
    f2a1b31 View commit details
    Browse the repository at this point in the history