From 31e527151d3ec4bfe267db2499f13ef278ab3abd Mon Sep 17 00:00:00 2001 From: Richard Holloway Date: Wed, 11 Jan 2017 00:05:32 +0700 Subject: [PATCH] Remove spaces from list of extensions before passing to command + Remove extra \ --- src/PHPCensor/Plugin/PhpParallelLint.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/PHPCensor/Plugin/PhpParallelLint.php b/src/PHPCensor/Plugin/PhpParallelLint.php index 5fa044bb..4a1cd744 100644 --- a/src/PHPCensor/Plugin/PhpParallelLint.php +++ b/src/PHPCensor/Plugin/PhpParallelLint.php @@ -60,9 +60,10 @@ 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 = $options['extensions']; + $this->extensions = str_replace(' ', '', $options['extensions']); } } }