Skip to content

Commit

Permalink
CS.
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Jul 27, 2016
1 parent c529f4b commit bfe1534
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ PHPLint
## Installation

```shell
$ composer require overtrue/phplint
$ composer require overtrue/phplint -vvv
```

## Usage
Expand Down
12 changes: 6 additions & 6 deletions src/Linter.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function lint($files = [])
$newCache = [];

while (!empty($files) || !empty($running)) {
for ($i = count($running); $files && $i < $this->procLimit; ++$i) {
for ($i = count($running); !empty($files) && $i < $this->procLimit; ++$i) {
$file = array_shift($files);
$filename = $file->getRealpath();

Expand Down Expand Up @@ -139,18 +139,18 @@ public function setCache($cache = [])
public function getFiles()
{
if (empty($this->files)) {
$this->files = new Finder();
$this->files->files()->ignoreUnreadableDirs()->in(realpath($this->path));
$finder = new Finder();
$finder->files()->ignoreUnreadableDirs()->in(realpath($this->path));

foreach ($this->excludes as $exclude) {
$this->files->notPath($exclude);
$finder->notPath($exclude);
}

foreach ($this->extensions as $extension) {
$this->files->name('*.'.$extension);
$finder->name('*.'.$extension);
}

$this->files = iterator_to_array($this->files);
$this->files = iterator_to_array($finder);
}

return $this->files;
Expand Down

0 comments on commit bfe1534

Please sign in to comment.