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.
Hi there,
thanks for the tool it's really helpful 👍🏼 (although I'm not sure we are using it correctly 🙈 )
The latest update however broke our usage due to a bug in #424 :(
and my understanding/observation makes me think it is not intended.
We hope this patch is okay as we'd like to keep our local comments on the classes:
https://github.com/nextcloud/spreed/blob/f60017eb778730874615a955b99510624c074534/lib/Signaling/Responses/DialOut.php#L29-L47
The problem is that the new list of strings you check is a bit flawed. This can be observed by
var_dump($cases);
after:Valinor/src/Utility/Reflection/DocParser.php
Line 74 in f4884cf
Current master with my adjusted test file:
And I think that is more than intended, because the segment before the first matching
$case
string is being duplicated everytime (and the initial comment staying there too). The only reason this is not visible without my broken comment is that$types[$matches['name']] = self::findType($matches['type']);
is basically deduplicating your results and saving the last split string as final result, which is the one that is correct. But if there was an invalid type in between it bails out with an exception.With my PR the resulting cases are:
Result before this PR with the adjusted test file
Result with this PR