[BUGFIX] Use self:: instead of static:: late binding for private constants #176
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.
Class constants are marked
private
but consuming code uses late static binding withstatic::
to access them. Since the constants are private, late static binding makes no sense (no subclass would be able to use the constants) and simply causes an error (access to undefined constant). This patch prevents that error from happening in e.g. https://github.com/georgringer/oidc-be.There are two ways to solve this:
protected
orpublic
.I've chosen the latter in this case since there will not be a need to change the values of these constants or access them externally. Any subclass that chooses to override the method that does use the constants will have to return these values in another way or call the
parent::
method to perform the initial validation and get a return code based on the constants.