From eea29dabe853ec944148ffb4d90882eabfa33ab6 Mon Sep 17 00:00:00 2001 From: Richard Holloway Date: Wed, 11 Jan 2017 00:06:41 +0700 Subject: [PATCH] Better regex (allow more than two extensions) --- src/PHPCensor/Plugin/PhpParallelLint.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PHPCensor/Plugin/PhpParallelLint.php b/src/PHPCensor/Plugin/PhpParallelLint.php index 4a1cd744..831b3a4a 100644 --- a/src/PHPCensor/Plugin/PhpParallelLint.php +++ b/src/PHPCensor/Plugin/PhpParallelLint.php @@ -60,7 +60,7 @@ class PhpParallelLint extends Plugin if (isset($options['extensions'])) { // Only use if this is a comma delimited list - $pattern = '/^[a-z]*,\ *[a-z]*$/'; + $pattern = '/^([a-z]+)(,\ *[a-z]*)*$/'; if (preg_match($pattern, $options['extensions'])) { $this->extensions = str_replace(' ', '', $options['extensions']);