Skip to content

Commit

Permalink
preg_match returns int
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernard authored and pradzikowski committed Apr 7, 2017
1 parent ba8069c commit 192ada8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/RegexVerifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
*/
class RegexVerifier extends AbstractPCFVerifier
{
const PREG_MATCH_FOUND_RETURN = 1;

/**
* @inheritdoc
*/
Expand Down Expand Up @@ -39,7 +41,7 @@ protected function doVerifyDomain(string $domain): int
private function pregList(array $list, string $domain): bool
{
foreach ($list as $pattern) {
if (true === preg_match("/$pattern/", $domain)) {
if (self::PREG_MATCH_FOUND_RETURN === preg_match("/$pattern/", $domain)) {
return true;
}
}
Expand Down

0 comments on commit 192ada8

Please sign in to comment.