Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jul 12, 2024
1 parent 5738d5a commit 6a91ff1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ Also, you can combine them (very handy for blog posts and tweets):
vendor/bin/lines measure src --short --json
```

<br>

Are you looking for top 10 longest files?

```bash
vendor/bin/lines measure src --longest
```

## The Measured Items

For the text output, you'll get data like these:
Expand Down
2 changes: 1 addition & 1 deletion src/Measurements.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function addFile(string $filename): void
$this->directoryNames[] = dirname($filename);

$relativeFilePath = str_replace(getcwd() . '/', '', $filename);
$this->filesToSize[$relativeFilePath] = substr_count(file_get_contents($filename), "\n") + 1;
$this->filesToSize[$relativeFilePath] = substr_count((string) file_get_contents($filename), "\n") + 1;

++$this->fileCount;
}
Expand Down

0 comments on commit 6a91ff1

Please sign in to comment.