Download the PHP package piotrpasich/code-quality-threshold without Composer

On this page you can find all versions of the php package piotrpasich/code-quality-threshold. 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 code-quality-threshold

Code Quality Threshold

This extension is purposed to run every necessary tool to check the code against violation from composer (ex. tools - PHP Mess Detector, PHP Code Sniffer, PHP Dead Code Detector, PHP Copy Paste).

Installation

composer require piotrpasich/code-quality-threshold:dev-master --dev

Configuration

To your composer.json file you might add

"scripts": {
    "quality-test": [
        "piotrpasich\\CodeQualityThreshold\\Composer\\ScriptHandler::checkThresholds"
    ]
},

And execute the command

composer quality-test

You can also add this script to already existing scripts like post-update-cmd.

Reports

If the test throws an exception you can always ask for the report:

composer quality-test -v

Advanced configuration

This plugin checks the app folder by default, but you can always change this behavior by creating yml file. This might be placed wherever you want, ex. app/Config/cqt.yml

Then you need to add to your composer.json file the extra option:

"extra": {
    "cqt-parameters": {
        "file": "app/Config/cqt.yml"
    }
}

The example yml file might look like:

phpmd:
    class: piotrpasich\CodeQualityThreshold\Tool\Phpmd
    options:
        threshold: 42
        directory: src
        rules: Config/Phpmd/ruleset.xml

phpcs:
    class: piotrpasich\CodeQualityThreshold\Tool\Phpcs
    options:
        threshold: 42
        rules: Config/Phpcs/ruleset.xml
        directory: src

phpcpd:
    class: piotrpasich\CodeQualityThreshold\Tool\Phpcpd
    options:
        threshold: 42
        directory: src

Phpdcd:
    class: piotrpasich\CodeQualityThreshold\Tool\Phpdcd
    options:
        directory: src
        threshold: 21

Adding new tools

To add new tool you need to specify new record in yml file (look at the Advanced configuration chapter) and create a class extending Tool abstract class from the plugin.


All versions of code-quality-threshold with dependencies

PHP Build Version
Package Version
Requires symfony/process Version 2.*
symfony/yaml Version 2.*
symfony/options-resolver Version 2.*
phpmd/phpmd Version @stable
squizlabs/php_codesniffer Version 2.*
sebastian/phpcpd Version *
sebastian/phpdcd Version *
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 piotrpasich/code-quality-threshold contains the following files

Loading the files please wait ....