PHP Classes

PHP Wording Detector: Generate reports on the usage of words in classes

Recommend this page to a friend!

  Author Author  
Picture of DeGraciaMathieu
Name: DeGraciaMathieu <contact>
Classes: 14 packages by
Country: France France
Innovation award
Innovation award
Nominee: 9x


  Detailed description   Download Download .zip .tar.gz  
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.

Details

<p align="center"> <img src="https://github.com/DeGraciaMathieu/php-smelly-code-detector/blob/master/arts/robot.png" width="250"> </p>

testing Packagist Version Packagist PHP Version

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%    |
+--------------+-------+-------------+

  Classes of DeGraciaMathieu  >  PHP Wording Detector  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: PHP Wording Detector
Base name: php-wording-detector
Description: Generate reports on the usage of words in classes
Version: -
PHP version: 5
License: The PHP License
 
  Groups   Applications   Files Files  

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Language Constructs to assist in the language control View top rated classes
Group folder image Parsers Programming language interpreters and format parsers View top rated classes


  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Files folder image.github (1 directory)
Files folder imageapp (5 directories)
Files folder imagebootstrap (1 file)
Files folder imageconfig (3 files)
Files folder imageresources (1 directory)
Files folder imagetests (2 files, 1 directory)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file box.json Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file php-wording-detector Appl. Application script
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  .github  
File Role Description
Files folder imageworkflows (1 file)

  Files folder image Files  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file phpunit.yml Data Auxiliary data

  Files folder image Files  /  app  
File Role Description
Files folder imageBags (1 file)
Files folder imageCommands (1 file)
Files folder imageNodes (2 files)
Files folder imageProviders (1 file)
Files folder imageVisitors (1 file)

  Files folder image Files  /  app  /  Bags  
File Role Description
  Plain text file WordsBag.php Class Class source

  Files folder image Files  /  app  /  Commands  
File Role Description
  Plain text file Inspect.php Class Class source

  Files folder image Files  /  app  /  Nodes  
File Role Description
  Plain text file NodeExtractor.php Class Class source
  Plain text file NodeValidator.php Class Class source

  Files folder image Files  /  app  /  Providers  
File Role Description
  Plain text file AppServiceProvider.php Class Class source

  Files folder image Files  /  app  /  Visitors  
File Role Description
  Plain text file ClassVisitor.php Class Class source

  Files folder image Files  /  bootstrap  
File Role Description
  Plain text file app.php Class Class source

  Files folder image Files  /  config  
File Role Description
  Plain text file app.php Class Class source
  Plain text file commands.php Class Class source
  Accessible without login Plain text file view.php Aux. Auxiliary script

  Files folder image Files  /  resources  
File Role Description
Files folder imageviews (1 file)

  Files folder image Files  /  resources  /  views  
File Role Description
  Accessible without login Plain text file inspect.blade.php Aux. Auxiliary script

  Files folder image Files  /  tests  
File Role Description
Files folder imageUnit (2 directories)
  Plain text file CreatesApplication.php Class Class source
  Plain text file TestCase.php Class Class source

  Files folder image Files  /  tests  /  Unit  
File Role Description
Files folder imageBags (1 file)
Files folder imageNodes (2 files)

  Files folder image Files  /  tests  /  Unit  /  Bags  
File Role Description
  Plain text file WordsBagTest.php Class Class source

  Files folder image Files  /  tests  /  Unit  /  Nodes  
File Role Description
  Plain text file NodeExtractorTest.php Class Class source
  Plain text file NodeValidatorTest.php Class Class source

Download Download all files: php-wording-detector.tar.gz php-wording-detector.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
  Files folder image Files  
File Role Description
Files folder image.github (1 directory)
Files folder imageapp (5 directories)
Files folder imagebootstrap (1 file)
Files folder imageconfig (3 files)
Files folder imageresources (1 directory)
Files folder imagetests (2 files, 1 directory)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file box.json Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file php-wording-detector Appl. Application script
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  .github  
File Role Description
Files folder imageworkflows (1 file)

  Files folder image Files  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file phpunit.yml Data Auxiliary data

  Files folder image Files  /  app  
File Role Description
Files folder imageBags (1 file)
Files folder imageCommands (1 file)
Files folder imageNodes (2 files)
Files folder imageProviders (1 file)
Files folder imageVisitors (1 file)

  Files folder image Files  /  app  /  Bags  
File Role Description
  Plain text file WordsBag.php Class Class source

  Files folder image Files  /  app  /  Commands  
File Role Description
  Plain text file Inspect.php Class Class source

  Files folder image Files  /  app  /  Nodes  
File Role Description
  Plain text file NodeExtractor.php Class Class source
  Plain text file NodeValidator.php Class Class source

  Files folder image Files  /  app  /  Providers  
File Role Description
  Plain text file AppServiceProvider.php Class Class source

  Files folder image Files  /  app  /  Visitors  
File Role Description
  Plain text file ClassVisitor.php Class Class source

  Files folder image Files  /  bootstrap  
File Role Description
  Plain text file app.php Class Class source

  Files folder image Files  /  config  
File Role Description
  Plain text file app.php Class Class source
  Plain text file commands.php Class Class source
  Accessible without login Plain text file view.php Aux. Auxiliary script

  Files folder image Files  /  resources  
File Role Description
Files folder imageviews (1 file)

  Files folder image Files  /  resources  /  views  
File Role Description
  Accessible without login Plain text file inspect.blade.php Aux. Auxiliary script

  Files folder image Files  /  tests  
File Role Description
Files folder imageUnit (2 directories)
  Plain text file CreatesApplication.php Class Class source
  Plain text file TestCase.php Class Class source

  Files folder image Files  /  tests  /  Unit  
File Role Description
Files folder imageBags (1 file)
Files folder imageNodes (2 files)

  Files folder image Files  /  tests  /  Unit  /  Bags  
File Role Description
  Plain text file WordsBagTest.php Class Class source

  Files folder image Files  /  tests  /  Unit  /  Nodes  
File Role Description
  Plain text file NodeExtractorTest.php Class Class source
  Plain text file NodeValidatorTest.php Class Class source

Download Download all files: php-wording-detector.tar.gz php-wording-detector.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.