Skip to content

Commit

Permalink
Fix bug #13.
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Aug 17, 2016
1 parent a493849 commit 8dfebbf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class Application extends BaseApplication
{
const NAME = 'phplint';
const VERSION = '0.0.3';
const VERSION = '0.0.4';

/**
* Constructor.
Expand Down
1 change: 1 addition & 0 deletions src/Linter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Process/Lint.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function getSyntaxError()
*/
public function parseError($message)
{
$pattern = '/^Parse error:\s*(?:\w+ error,\s*)?(?<error>.+?)\s+in\s+.+?\s*line\s+(?<line>\d+)/';
$pattern = '/^(PHP\s+)?Parse error:\s*(?:\w+ error,\s*)?(?<error>.+?)\s+in\s+.+?\s*line\s+(?<line>\d+)/';

preg_match($pattern, $message, $match);

Expand Down

0 comments on commit 8dfebbf

Please sign in to comment.