Download the PHP package degraciamathieu/php-smelly-code-detector without Composer

On this page you can find all versions of the php package degraciamathieu/php-smelly-code-detector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-smelly-code-detector

testing phpstan Packagist Version Packagist PHP Version

php-smelly-code-detector

 "A code smell is a surface indication that usually corresponds to a deeper problem in the system." ~ Martin Fowler

Code smell is a potentially problematic code indicator with the following formula : ($ccn + $arg) * $loc

A high smell value will often reveal that the method is too complex.

This complexity could be detrimental to the maintainability of the method, favoring the appearance of bugs in the future.

This indicator does not replace the expertise of a developer and must above all be considered as an alarm detecting "smelly" code.

Installation

Phar

This tool is distributed as a PHP Archive (PHAR):

Composer

Alternately, you can directly use composer :

Analyze methods

Options

options description
--min-smell= The minimum smell threshold to show.
--max-smell= The maximum smell threshold to show.
--only= Comma-separated list of smells to show.
--ignore= Comma-separated list of smells to ignore.
--limit= The maximum number of results to show, default 20.
--public Show only public methods.
--private Show only private methods.
--protected Show only protected methods.
--without-constructor Hide constructors.
--sort-by=smell Sort order (smell, loc, arg, ccl), default smell.
--json Render metrics in JSON

Examples

20 lines are displayed by default, you can configure this with the --limit= option.

You can select scanned files with --only= and --ignore= options.

You can select the visibilities to keep with the --public, --protected and --private options.

By default, rows will be sorted by the smell value, you can change the sort order with --sort-by= option, the following values are available : loc, arg, ccl, smell.

Analyze class

This command gives the total smell of a class, as well as an average by method and a breakdown by visibility.

Options

options description
--only= Comma-separated list of smells to show.
--ignore= Comma-separated list of smells to ignore.
--limit= The maximum number of results to show, default 20.
--public Show only public methods.
--private Show only private methods.
--protected Show only protected methods.
--without-constructor Hide constructors.
--sort-by=smell Sort order (count, smell, avg), default smell.
--json Render metrics in JSON

Examples


All versions of php-smelly-code-detector with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
degraciamathieu/php-file-explorer Version 0.4.*
illuminate/view Version ^10.0
laravel-zero/framework Version ^10.0
nikic/php-parser Version ^4.13
nunomaduro/termwind Version ^1.15
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package degraciamathieu/php-smelly-code-detector contains the following files

Loading the files please wait ....