diff --git a/src/Interfaces/TestMethodProvider.php b/src/Interfaces/TestMethodProvider.php index 298c044..3ce8f68 100644 --- a/src/Interfaces/TestMethodProvider.php +++ b/src/Interfaces/TestMethodProvider.php @@ -3,7 +3,7 @@ namespace SRL\Interfaces; use SRL\Exceptions\PregException; -use SRL\Match; +use SRL\SRLMatch; /** * Provider for methods that can be applied to the built regular expression by the user. @@ -92,11 +92,10 @@ public function filter($replacement, $haystack, int $limit = -1, &$count = null) /** * Match regular expression against string and return all matches. - * * @param string $string * @param int $offset - * @throws PregException - * @return Match[]|array + * @return SRLMatch[]|array + *@throws PregException */ public function getMatches(string $string, int $offset = 0) : array { @@ -107,7 +106,7 @@ public function getMatches(string $string, int $offset = 0) : array $matchObjects = []; foreach ($matches as $match) { - $matchObjects[] = new Match($match); + $matchObjects[] = new SRLMatch($match); } return $matchObjects; @@ -115,11 +114,10 @@ public function getMatches(string $string, int $offset = 0) : array /** * Match regular expression against string and return first match object. - * * @param string $string * @param int $offset - * @throws PregException - * @return null|Match + * @return null|SRLMatch + *@throws PregException */ public function getMatch(string $string, int $offset = 0) { diff --git a/src/Match.php b/src/SRLMatch.php similarity index 98% rename from src/Match.php rename to src/SRLMatch.php index c898427..2f852d8 100644 --- a/src/Match.php +++ b/src/SRLMatch.php @@ -2,7 +2,7 @@ namespace SRL; -class Match +class SRLMatch { /** @var string[] */ protected $rawData = [];