| Total Complexity | 2 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | final class GithubPullRequestParser implements InlineParserInterface |
||
| 14 | { |
||
| 15 | // Regex used to match Github pull request link. |
||
| 16 | public const REGEXP_PURLLREQUEST = '\bhttps?:\/\/github\.com\/(?<repo>[\w-]+\/[\w-]+)\/'. |
||
| 17 | '(?<type>issues|pull)\/(?<issue>\d+)'; |
||
| 18 | |||
| 19 | public function getMatchDefinition(): InlineParserMatch |
||
| 20 | { |
||
| 21 | return InlineParserMatch::regex(self::REGEXP_PURLLREQUEST); |
||
| 22 | } |
||
| 23 | |||
| 24 | public function parse(InlineParserContext $inlineContext): bool |
||
| 48 | } |
||
| 49 | } |
||
| 50 |