Download the PHP package arxeiss/coding-standards without Composer

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

PHP CodeSniffer - Custom standard ruleset

PHP from Packagist Packagist Version

Custom ruleset for PHP CodeSniffer with Slevomat sniffs. Ruleset is based on PSR2 + PSR12 with additional rules, more detailed list is below. Ruleset is possible to use with space indentation and also tabs indentation.

Installation and running

Install with composer:

and run CodeSniffer

Custom ruleset file

Better way is to create custom file phpcs.xml, with content like phpcs.example.xml. After that it is possible to run

More info about PHP CodeSniffer can be found in the PHP CS wiki

Groups of sniffs

Package consist of multiple files based on the used sniffs.
There are 3 files basic files including all selected sniffs. Use phpcs-spaces.xml or phpcs-tabs.xml, not both. Optionally it is possible to add also phpcs-strict.xml.

It can be handy to not include all sniffs at once, specially when migrating big project. Files above just including these partial files:

If building own ruleset based on partial files, always use Parts/phpcs-psr.xml, then Parts/phpcs-use-spaces.xml or Parts/phpcs-use-tabs.xml.
Later more additional rules can be added. See phpcs.example.xml.

Included sniffs

See SniffList, I wrote one sentence explanation for each used sniff into XML files.

Also Slevomat rules have some comments about in their repository Readme https://github.com/slevomat/coding-standard

More suggested

Check that Namespace matches file structure

This is used from my own blog in Laravel, where main folder app is BlogApp namespace.

Since v0.11.0 mixed typehint is not required

Explanation can be found here https://github.com/arxeiss/php-coding-standards/pull/6

If you want to force linter to use mixed typehint, you can enable by adding this into phpcs.xml file.


All versions of coding-standards with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2 || ^8.0
slevomat/coding-standard Version ^8.11.0
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 arxeiss/coding-standards contains the following files

Loading the files please wait ....