Download the PHP package mito/coding-standards without Composer

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

Mito PHP Coding Standards

This repository contains Mito's coding standards for PHP based applications.

Getting the code

You can get code style definition using one of the following methods.

PHP_Codesniffer

This repository contains five phpcs standards:

These standards are based on PSR-12, with some additions and improvements.

The Views standards disable some rules that cause problems when mixing php with html, and therefore cannot fully check view files and cannot fix all problems in them, so be careful when using phpcbf with view files.

For a full description of the rules, see docs/rules.md.

Using the standards

After CodeSniffer is installed, you can launch it with a custom standard using the following syntax:

To automatically fix most issues, use phpcbf:

Warning: always check phpcbf's output and keep backups. If it breaks your code, you get to keep both pieces.

You should also run a syntax check using php -l before running phpcbf, because some sniffs assume the code is syntactically valid, and may mangle it if it is not.

If you're using PhpStorm you can configure it to use CodeSniffer using Settings → PHP → Code Sniffer. The standard can be specified at Inspections → PHP → PHP Code Sniffer validation.

Note that this will check all your files with a single standard, but you should use different standards for different types of files. These standards were designed for use with gulp-phpcs and gulp-phpcbf, so instead of using exclusion patterns in the ruleset.xml, they rely on the gulp task selecting the appropriate standard for a file.

You can write your own ruleset.xml that extends from the Application standard and contains appropriate exclusion patterns (check the Others and Views ruleset.xml files for what rules to exclude).

Useful links

Contributing

See CONTRIBUTING.md for information.


All versions of coding-standards with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
squizlabs/php_codesniffer Version ^3.7.1
symfony/polyfill-mbstring 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 mito/coding-standards contains the following files

Loading the files please wait ....