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