Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QA: add missing early return statement
In contrast to the intention expressed in the comment in the code, the state was not being ignored as the function did not `return` within the `if` statement. As the docblock indicates that the function should return an array, I've chosen to return an empty array for this event, but I can imagine that throwing a `RuntimeException` or returning with a more specific error state in the array may be more appropriate. Consider this PR as flagging up the code error, but the final implementation needs to be decided by people more familiar with the code than me.
- Loading branch information