diff --git a/src/Console/Application.php b/src/Console/Application.php index 456dfb5f..a4a56601 100644 --- a/src/Console/Application.php +++ b/src/Console/Application.php @@ -17,7 +17,7 @@ class Application extends BaseApplication { const NAME = 'phplint'; - const VERSION = '0.0.3'; + const VERSION = '0.0.4'; /** * Constructor. diff --git a/src/Linter.php b/src/Linter.php index 449d3508..9c3eeb94 100644 --- a/src/Linter.php +++ b/src/Linter.php @@ -60,6 +60,7 @@ class Linter */ public function __construct($path, array $excludes = [], array $extensions = ['php']) { + ini_set('error_reporting', E_ALL); $this->path = $path; $this->excludes = $excludes; $this->extensions = $extensions; diff --git a/src/Process/Lint.php b/src/Process/Lint.php index 9438be2f..cf64869a 100644 --- a/src/Process/Lint.php +++ b/src/Process/Lint.php @@ -46,7 +46,7 @@ public function getSyntaxError() */ public function parseError($message) { - $pattern = '/^Parse error:\s*(?:\w+ error,\s*)?(?.+?)\s+in\s+.+?\s*line\s+(?\d+)/'; + $pattern = '/^(PHP\s+)?Parse error:\s*(?:\w+ error,\s*)?(?.+?)\s+in\s+.+?\s*line\s+(?\d+)/'; preg_match($pattern, $message, $match);