Skip to content

Commit

Permalink
Apply fixes from StyleCI (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue authored Jul 4, 2017
1 parent e7b20fd commit 6809fb0
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 10 deletions.
5 changes: 4 additions & 1 deletion src/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 5 additions & 2 deletions src/Command/LintCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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>');
}
Expand Down
5 changes: 4 additions & 1 deletion src/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
11 changes: 7 additions & 4 deletions src/Linter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 = [];
Expand Down Expand Up @@ -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;
}
Expand All @@ -161,7 +164,7 @@ public function getFiles()
/**
* Get files from directory.
*
* @param string $dir
* @param string $dir
*
* @return array
*/
Expand Down
5 changes: 4 additions & 1 deletion src/Output/ConsoleOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 4 additions & 1 deletion src/Process/Lint.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6809fb0

Please sign in to comment.