LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

phploc

measures PHP project size and complexity

TLDR

Measure project size
$ phploc [src/]
copy
Output as CSV
$ phploc --log-csv [stats.csv] [src/]
copy
Exclude a directory
$ phploc --exclude [vendor] [.]
copy
Count tests
$ phploc --count-tests [src/]
copy
Analyze specific file suffixes
$ phploc --suffix [php] --suffix [inc] [src/]
copy
Exclude multiple directories
$ phploc --exclude [vendor] --exclude [tests] [src/]
copy

SYNOPSIS

phploc [options] directories...

DESCRIPTION

phploc measures the size and complexity of a PHP project. It reports metrics including lines of code (LOC), comment lines, non-comment lines, number of classes, methods, functions, interfaces, traits, namespaces, constants, and cyclomatic complexity.The tool scans directories recursively for PHP files and generates a summary of structural metrics. It is part of the PHP QA toolchain created by Sebastian Bergmann.

PARAMETERS

DIRECTORIES

One or more directories to analyze.
--log-csv FILE
Write results in CSV format to file.
--log-xml FILE
Write results in XML format to file.
--exclude DIR
Exclude directory from analysis. Can be specified multiple times.
--suffix SUFFIX
File suffix to include (default: php). Can be specified multiple times.
--count-tests
Include test-related metrics in the output.
--names NAMES
Comma-separated list of file names to include.
--names-exclude NAMES
Comma-separated list of file names to exclude.
--help
Display help information.
--version
Display version information.

INSTALL

yay -S phploc
copy

CAVEATS

Phploc has been archived by its author and is no longer actively maintained. It analyzes directories recursively by default. Only files with the `.php` suffix are scanned unless changed with `--suffix`.

HISTORY

PHPLOC was created by Sebastian Bergmann, also known for PHPUnit, as part of the PHP quality assurance toolkit.

SEE ALSO

cloc(1), phpmd(1), phpcs(1), sloccount(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid