Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2024-02-27 (7 months ago) | Not enough user ratings | Total: 21 | All time: 11,275 This week: 48 |
Version | License | PHP version | Categories | |||
php-git-insights-ana 1.0 | The PHP License | 7 | Project Management, PHP 7 |
<p align="center"> <img src="https://github.com/DeGraciaMathieu/php-smelly-code-detector/blob/master/arts/robot.png" width="250"> </p>
This tool is distributed as a PHP Archive (PHAR):
wget https://github.com/DeGraciaMathieu/php-git-insights-analyzer/raw/master/builds/php-git-insights-analyzer
php php-git-insights-analyzer --version
First, you need to load the data required for the analysis :
php php-git-insights-analyzer app:load
Package uses git commands to retrieve files history, which is relatively time-consuming, so it was more efficient to create a database before carrying out the analyses.
> For information, database is stored in the analyse.json
Then analyse the data using the following command :
php php-git-insights-analyzer app:report
$ php php-git-insights-analyzer app:report
? PHP Git Insights Analyzer ?
?????????????????????????????????????????????????????????????????????????????????????????????????
? name ? lines ? comm. ? cont. ? acs ? acsr ? wpc ? wpcr ?
?????????????????????????????????????????????????????????????????????????????????????????????????
? Actions/GameAndRandomClipsSample.php ? 55 ? 2 ? 1 ? 27 ? 49 ? 55 ? 100 ?
? Console/Kernel.php ? 27 ? 1 ? 1 ? 27 ? 100 ? 27 ? 100 ?
? Dtos/Uuid.php ? 37 ? 3 ? 1 ? 12 ? 32 ? 37 ? 100 ?
? Enums/AutoplayEnum.php ? 9 ? 1 ? 1 ? 9 ? 100 ? 9 ? 100 ?
? Enums/ClipStateEnum.php ? 15 ? 2 ? 1 ? 7 ? 46 ? 15 ? 100 ?
? Exceptions/AssertException.php ? 10 ? 1 ? 1 ? 10 ? 100 ? 10 ? 100 ?
? Exceptions/Handler.php ? 35 ? 4 ? 1 ? 8 ? 22 ? 35 ? 100 ?
? Http/Controllers/Controller.php ? 12 ? 1 ? 1 ? 12 ? 100 ? 12 ? 100 ?
? Http/Controllers/HomeController.php ? 37 ? 9 ? 2 ? 4 ? 10 ? 18 ? 48 ?
? Http/Controllers/PaginateClipController.php ? 48 ? 8 ? 2 ? 6 ? 12 ? 24 ? 50 ?
?????????????????????????????????????????????????????????????????????????????????????????????????
Understanding analysis :
| Abbreviation | Metric | Description | | ------------ | ------------------------------ | ------------------------------------------------------------------------------ | | comm. | Commits | Number of file commits. | | cont. | Contributors | Number of distinct contributors. | | acs | Average Commit Size | Average size of file commits. | | acsr | Average Commit Size Ratio | Proportion of average commit size compared to the total file size. | | wpc | Workload Per Contributor | Average size of a contributor's commits. | | wpcr | Workload Per Contributor Ratio | Proportion of average contributor commit size compared to the total file size. |
| Options | Description | |-----------------------|-------------| | --folder= | Filter results by folder (e.g., --folder=Http/Controllers).| | --limit= | Specify the maximum number of results to display (default is 10).| | --sorts= | Sets the sorting order for results. The first value (lines, commits, contributors, acs, acsr, wpc, wpcr) corresponds to the affected field, and the second value (desc,asc; default desc) determines the sorting order.| | --thresholds= | Sets a threshold for the specified metric to filter results. The first value (lines, commits, contributors, acs, acsr, wpc, wpcr) corresponds to the affected metric, and the second value (e.g., 60) represents the minimum value required to apply the threshold.|
Files with more than 300 lines and low contributor diversity :
php php-git-insights-analyzer app:report --limit=10 --thresholds=wpcr,60 --thresholds=lines,300
Files with more than 10 commits and low contributor diversity :
php php-git-insights-analyzer app:report --limit=10 --thresholds=wpcr,60 --thresholds=commits,10
File with more than 10 commits and a renewal ratio of 10% with each commit.
php php-git-insights-analyzer app:report --limit=10 --thresholds=acsr,10 --thresholds=commits,10
> [!TIP] > Other analysis tools are available.
Files (46) |
File | Role | Description | ||
---|---|---|---|---|
app (5 directories) | ||||
bootstrap (1 file) | ||||
config (3 files) | ||||
tests (3 files, 2 directories) | ||||
.editorconfig | Data | Auxiliary data | ||
box.json | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
composer.lock | Data | Auxiliary data | ||
php-git-insights-analyzer | Class | Class source | ||
phpunit.xml.dist | Data | Auxiliary data | ||
README.md | Doc. | Documentation |
Files (46) | / | app |
File | Role | Description | ||
---|---|---|---|---|
Application (2 directories) | ||||
Domain (4 directories) | ||||
Infrastructure (2 directories) | ||||
Presenter (1 directory) | ||||
Providers (1 file) |
Files (46) | / | app | / | Application | / | Load |
File | Role | Description |
---|---|---|
LoadHandler.php | Class | Class source |
LoadOutputInterface.php | Class | Class source |
LoadRequestInterface.php | Class | Class source |
Files (46) | / | app | / | Application | / | Report |
File | Role | Description |
---|---|---|
ReportHandler.php | Class | Class source |
ReportOutputInterface.php | Class | Class source |
ReportRequestInterface.php | Class | Class source |
Files (46) | / | app | / | Domain |
File | Role | Description | ||
---|---|---|---|---|
Aggregators (2 files) | ||||
Contracts (2 directories) | ||||
Entities (5 files) | ||||
Services (3 files) |
Files (46) | / | app | / | Domain | / | Aggregators |
File | Role | Description |
---|---|---|
ReportAggregator.php | Class | Class source |
TrackedFileAggregator.php | Class | Class source |
Files (46) | / | app | / | Domain | / | Contracts | / | Gateways |
File | Role | Description |
---|---|---|
FileVersionControlGateway.php | Class | Class source |
Files (46) | / | app | / | Domain | / | Contracts | / | Repositories |
File | Role | Description |
---|---|---|
TrackedFileRepository.php | Class | Class source |
Files (46) | / | app | / | Domain | / | Entities |
File | Role | Description |
---|---|---|
Analysis.php | Class | Class source |
Metric.php | Class | Class source |
Path.php | Class | Class source |
ReportLine.php | Class | Class source |
TrackedFile.php | Class | Class source |
Files (46) | / | app | / | Domain | / | Services |
File | Role | Description |
---|---|---|
ReportGenerator.php | Class | Class source |
TrackedFileAnalyzer.php | Class | Class source |
TrackedFileService.php | Class | Class source |
Files (46) | / | app | / | Infrastructure | / | Gateways |
File | Role | Description |
---|---|---|
CliGitGateway.php | Class | Class source |
Files (46) | / | app | / | Infrastructure | / | Repositories |
File | Role | Description |
---|---|---|
TrackedFileStorageRepository.php | Class | Class source |
Files (46) | / | app | / | Presenter | / | Commands |
Files (46) | / | app | / | Presenter | / | Commands | / | Load |
File | Role | Description |
---|---|---|
LoadCliOutput.php | Class | Class source |
LoadCliRequest.php | Class | Class source |
LoadCommand.php | Class | Class source |
Files (46) | / | app | / | Presenter | / | Commands | / | Report |
File | Role | Description | ||
---|---|---|---|---|
Cli (3 files, 1 directory) | ||||
ReportCommand.php | Class | Class source |
Files (46) | / | app | / | Presenter | / | Commands | / | Report | / | Cli |
File | Role | Description | ||
---|---|---|---|---|
Concerns (2 files) | ||||
ReportCliOutput.php | Class | Class source | ||
ReportClipOutputOptions.php | Class | Class source | ||
ReportCliRequest.php | Class | Class source |
Files (46) | / | app | / | Presenter | / | Commands | / | Report | / | Cli | / | Concerns |
File | Role | Description |
---|---|---|
Sorts.php | Class | Class source |
Thresholds.php | Class | Class source |
Files (46) | / | config |
File | Role | Description |
---|---|---|
app.php | Class | Class source |
commands.php | Class | Class source |
filesystems.php | Aux. | Auxiliary script |
Files (46) | / | tests |
File | Role | Description | ||
---|---|---|---|---|
Feature (1 file) | ||||
Unit (1 file) | ||||
CreatesApplication.php | Class | Class source | ||
Pest.php | Class | Class source | ||
TestCase.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.