Download the PHP package tavy315/php-code-sniffer without Composer

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

PHP Code Sniffer

PHP Code Sniffer is a PHP code standard checker/beautifier/fixer tool based on PHP_CodeSniffer and includes custom sniffs used in PHP projects developed by I2ct.

Requirements

PHP Code Sniffer requires PHP 5.6 or later.

Install via Composer

Binaries

Binaries are located in bin directory but composer installer creates links under your vendor binary directory depending on your composer configuration.

Pre-Commit Hook

Save the following script as .git/hooks/pre-commit by replacing COMPOSER_BIN_DIR as your vendor binary directory name depending on your composer configuration.

Make sure the hook script is executable.

Customize

You can customize configuration by adding a file called phpcs.xml file into the root directory of your project. The phpcs.xml file has exactly the same format as a normal ruleset.xml file, so all the same options are available in it. You need to define I2ct rule to import all the I2ct rules.

Using a custom bootstrap file

You can add custom bootstrap files to be included before beginning the run. Some sniffs need to load classes from your project; so adding a autoload file will allow sniffs to do this.

Imported Standards

PSR2

All PSR2 sniffs except Squiz.WhiteSpace.ControlStructureSpacing are imported by default.

Generic

Imported sniffs:

Squiz

Imported sniffs:

Custom Sniffs

I2ct.Arrays.ArrayDeclaration

I2ct.Commenting.DocComment

I2ct.Commenting.FunctionComment

I2ct.Commenting.VariableComment

I2ct.Formatting.DisallowMultipleStatements

I2ct.Strings.ConcatenationSpacing

This sniff has two rules and fixes.

I2ct.WhiteSpace.FunctionSpacing

I2ct.WhiteSpace.MemberVarSpacing

Development

Live Testing

You can test any modifications by running phpcbf.php and phpcs-pre-commit.php scripts under scripts directory.

Building Binaries

Run the command below to re-build binaries:

PHP_CodeSniffer Dependency

Current version is built on PHP_CodeSniffer 2.8.1 which is locked in composer.json file if required and run composer update command, then commit the modified PHP_CodeSniffer version may break some of PHP_CodeSniffer before updating.


[1] A class loader is required (eg. via a bootstrap file), otherwise a warning (Internal.I2ct.NeedClassLoader) will be generated. You can override this rule in phpcs.xml file in your project to prevent warnings. ↩


License Notices

PHP_CodeSniffer is licensed under the BSD 3-Clause license.


All versions of php-code-sniffer with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
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 tavy315/php-code-sniffer contains the following files

Loading the files please wait ....