-
-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
28 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,10 @@ | |
/* | ||
* This file is part of the overtrue/phplint. | ||
* | ||
* (c) 2016 overtrue <[email protected]> | ||
* (c) overtrue <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Overtrue\PHPLint; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,10 @@ | |
/* | ||
* This file is part of the overtrue/phplint. | ||
* | ||
* (c) 2016 overtrue <[email protected]> | ||
* (c) overtrue <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Overtrue\PHPLint\Command; | ||
|
@@ -200,7 +203,7 @@ protected function executeLint($linter, $output, $fileCount, $cache = true) | |
} | ||
++$i; | ||
if ($verbosity >= OutputInterface::VERBOSITY_VERBOSE) { | ||
$output->writeln('Linting: '.$filename. "\t".($status === 'ok' ? '<info>OK</info>' : '<error>Error</error>')); | ||
$output->writeln('Linting: '.$filename."\t".($status === 'ok' ? '<info>OK</info>' : '<error>Error</error>')); | ||
} else { | ||
$output->write($status === 'ok' ? '<info>.</info>' : '<error>E</error>'); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,10 @@ | |
/* | ||
* This file is part of the overtrue/phplint. | ||
* | ||
* (c) 2016 overtrue <[email protected]> | ||
* (c) overtrue <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Overtrue\PHPLint\Console; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,10 @@ | |
/* | ||
* This file is part of the overtrue/phplint. | ||
* | ||
* (c) 2016 overtrue <[email protected]> | ||
* (c) overtrue <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Overtrue\PHPLint; | ||
|
@@ -81,7 +84,7 @@ public function lint($files = [], $cache = true) | |
$files = $this->getFiles(); | ||
} | ||
|
||
$processCallback = is_callable($this->processCallback) ? $this->processCallback : function() { | ||
$processCallback = is_callable($this->processCallback) ? $this->processCallback : function () { | ||
}; | ||
|
||
$errors = []; | ||
|
@@ -148,7 +151,7 @@ public function getFiles() | |
foreach ((array) $this->path as $path) { | ||
if (is_dir($path)) { | ||
$this->files = array_merge($this->files, $this->getFilesFromDir($path)); | ||
} else if (is_file($path)) { | ||
} elseif (is_file($path)) { | ||
$file = new SplFileInfo($path); | ||
$this->files[$file->getRealPath()] = $file; | ||
} | ||
|
@@ -161,7 +164,7 @@ public function getFiles() | |
/** | ||
* Get files from directory. | ||
* | ||
* @param string $dir | ||
* @param string $dir | ||
* | ||
* @return array | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,10 @@ | |
/* | ||
* This file is part of the overtrue/phplint. | ||
* | ||
* (c) 2016 overtrue <[email protected]> | ||
* (c) overtrue <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Overtrue\PHPLint\Output; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,10 @@ | |
/* | ||
* This file is part of the overtrue/phplint. | ||
* | ||
* (c) 2016 overtrue <[email protected]> | ||
* (c) overtrue <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Overtrue\PHPLint\Process; | ||
|