Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2023-03-10 (2 months ago)  | | Not yet rated by the users | | Total: 41 | | All time: 10,630 This week: 404 |
|
Description | | Author De Gracia Mathieu
Contributor
|
This package can generate reports on the usage of words in classes.
It provides an application that runs from the command line console to analyze the class files inside a given directory.
The package can analyze the words in class files, and then it outputs reports showing the number of times certain words are used and the percentage of the use of the words compared with the total words.
It can also show statistics of the total number of words, distinct words, and the average number of times all words are used. Innovation Award
 March 2023
Winner |
Domain-driven design (DDD) is an approach to software development that tries to match the programming style with language that uses words that better fit the use of words in a given domain of the problems that applications try to solve.
This package can analyze the words used in the code of PHP classes and generate reports of using words in the code.
This way, developers can see if the words used in their code are the same as those used in application problems and solutions.
Manuel Lemos |
| |
 |
|
Innovation award
 Nominee: 10x
Winner: 1x |
|
Details
<p align="center">
<img src="https://github.com/DeGraciaMathieu/php-smelly-code-detector/blob/master/arts/robot.png" width="250">
</p>

php-wording-detector
Simple tool to analyze and split the words contained in your variables to check your DDD approach.
Installation
Requires >= PHP 8.1
composer require degraciamathieu/php-wording-detector --dev
Usage
php php-wording-detector inspect {path}
$ php php-wording-detector inspect app
? PHP Wording Detector ?
+-------------+-----------------------+-------------+
| total words | total distincts words | average use |
+-------------+-----------------------+-------------+
| 18'363 | 560 | 33 |
+-------------+-----------------------+-------------+
+--------------+-------+-------------+
| words | usage | pourcentage |
+--------------+-------+-------------+
| user | 1629 | 9% |
| activity | 1150 | 6% |
| exam | 925 | 5% |
| organization | 671 | 4% |
| mode | 460 | 3% |
| data | 416 | 2% |
| code | 383 | 2% |
| builder | 368 | 2% |
| part | 351 | 2% |
| item | 350 | 2% |
| license | 308 | 2% |
| request | 296 | 2% |
| subscription | 289 | 2% |
| id | 228 | 1% |
| answers | 225 | 1% |
| coupon | 214 | 1% |
| question | 200 | 1% |
| exception | 182 | under 1% |
| current | 161 | under 1% |
| count | 160 | under 1% |
+--------------+-------+-------------+
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.