Download the PHP package leviy/coding-standard without Composer

On this page you can find all versions of the php package leviy/coding-standard. 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 coding-standard

Leviy Coding Standard

Build status Packagist version PHP from Packagist

The Leviy coding standard for PHP code, with rulesets for PHP CodeSniffer and PHP Mess Detector.

Installation

Install this package using Composer:

Installing the PHP CodeSniffer ruleset

Create a file phpcs.xml in the root of the project with the following contents:

Installing the PHP Mess Detector ruleset

Create a file phpmd.xml in the root of the project with the following contents:

Configuration

PHP CodeSniffer

An annotated ruleset.xml configuration file can be found here where you can see the complete range of features and configuration options that can be used to modify the configuration to your project needs.

PHP Mess Detector

Documentation about tweaking the ruleset and exluding rules or changing settings can be found here.

Usage

Run vendor/bin/phpcs to run PHP CodeSniffer. If you have a file phpcs.xml or phpcs.xml.dist in root directory of the project, CodeSniffer will use it automatically. Add a path to run CodeSniffer only against that file or directory. See Usage for more detailed usage instructions.

Run vendor/bin/phpmd src/ text phpmd.xml to run PHP Mess Detector against the src directory and print a report in the "text" format.

PHPStorm code sniffer validation

  1. Open "Preferences" and navigate to "Editor > Inspections".

  2. Enable "PHP > Quality tools > PHP_Code Sniffer validation".

  3. Select a "Custom" coding standard.

  4. Select the path to the projects code sniffer configuration.

Enjoy the immediate feedback of code sniffer validation issues!


All versions of coding-standard with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2||^8.0
dealerdirect/phpcodesniffer-composer-installer Version ^0.7.0
escapestudios/symfony2-coding-standard Version ^3.6
phpmd/phpmd Version ^2.9
slevomat/coding-standard Version ^7.0.9
squizlabs/php_codesniffer Version ^3.4
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 leviy/coding-standard contains the following files

Loading the files please wait ....