| Total Complexity | 3 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | trait Regex |
||
| 28 | { |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Does the source have any matches? |
||
| 32 | * |
||
| 33 | * @param string $pattern The pattern to match. |
||
| 34 | * @param string $source The source to match in. |
||
| 35 | * |
||
| 36 | * @return bool |
||
| 37 | */ |
||
| 38 | protected function matchesPattern(string $pattern, string $source): bool |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Get the regular expression matches from the source. |
||
| 47 | * |
||
| 48 | * @param string $pattern The pattern to match. |
||
| 49 | * @param string $source The source to match in. |
||
| 50 | * |
||
| 51 | * @return array[]|bool |
||
| 52 | */ |
||
| 53 | protected function getMatchesFromPattern(string $pattern, string $source) |
||
| 64 |