Implement the unescaping of doc string delimiters#393
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #393 +/- ##
============================================
+ Coverage 95.83% 95.86% +0.02%
- Complexity 667 669 +2
============================================
Files 44 44
Lines 1921 1934 +13
============================================
+ Hits 1841 1854 +13
Misses 80 80
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
| private bool $allowMultilineArguments = false; | ||
| private bool $allowSteps = false; | ||
| /** | ||
| * @phpstan-var TDocStringSeparator|null |
There was a problem hiding this comment.
phpstan is smart enough to analyse the regex used to match the delimiter and figure out that the delimiter capturing group will only ever match one of the 2 supported delimiter strings.
Using a more precise type for the property in which we assign that value allows us to avoid a dead default branch in the match statement finding the corresponding escaped delimiter.
| Behat\Gherkin\Node\PyStringNode: | ||
| strings: | ||
| - 'first line' | ||
| - '\"\"\"' |
There was a problem hiding this comment.
this is where we had a mismatch compared to the upstream expectation.
Closes #326