Skip to content

Commit

Permalink
Tweak match count
Browse files Browse the repository at this point in the history
  • Loading branch information
barryvdh committed Jul 20, 2014
1 parent 4fa3097 commit 0d7842b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Specificity.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ public static function fromSelector($selector)
)
)";

preg_match_all("/{$pattern_a}/ix", $selector, $matches_a);
preg_match_all("/{$pattern_b}/ix", $selector, $matches_b);
preg_match_all("/{$pattern_c}/ix", $selector, $matches_c);

return new static(count($matches_a[0]), count($matches_b[0]), count($matches_c[0]));
return new static(
preg_match_all("/{$pattern_a}/ix", $selector, $matches),
preg_match_all("/{$pattern_b}/ix", $selector, $matches),
preg_match_all("/{$pattern_c}/ix", $selector, $matches)
);
}

/**
Expand Down

0 comments on commit 0d7842b

Please sign in to comment.