Download the PHP package mayflower/mo4-coding-standard without Composer

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

MO4 CodeSniffer ruleset

Provides a PHP CodeSniffer ruleset for the MO4 coding standard

Build Status Code Coverage Scrutinizer Quality Level Codeclimate Maintainability SonarQube Maintainability

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock

MO4 Coding Standard

The MO4 Coding Standard is an extension of the Symfony Coding Standard and adds following rules:

MO4.Arrays.ArrayDoubleArrowAlignment

MO4.Arrays.MultiLineArray

MO4.Commenting.PropertyComment

MO4.Formatting.AlphabeticalUseStatements

Configuration

The order property of the MO4.Formatting.AlphabeticalUseStatements sniff defines which function is used for ordering.

Possible values for order:

To change the sorting order for your project, add this snippet to your custom ruleset.xml:

MO4.Formatting.UnnecessaryNamespaceUsage

MO4.Strings.VariableInDoubleQuotedString

MO4.WhiteSpace.ConstantSpacing

MO4.WhiteSpace.MultipleEmptyLines

Further rules (imported from other standards)

Note that with this ruleset, the following Symfony Coding Standard rules are not enforced:

Most of the issues can be auto-fixed with phpcbf.

Requires

Installation

Composer

Using Composer is the preferred way.

  1. Add the MO4 coding standard to composer.json

    composer require --dev mayflower/mo4-coding-standard
  2. Profit

    ./vendor/bin/phpcs --standard=MO4 path/to/my/file.php
  3. Optionally, you might set MO4 as default coding standard

    ./vendor/bin/phpcs --config-set default_standard MO4

Source

  1. Checkout this repository

    git clone https://github.com/mayflower/mo4-coding-standard.git
  2. Install dependencies

    composer install
  3. Check, that Symfony and MO4 are listed as coding standards

    ./vendor/bin/phpcs -i
  4. Profit

    ./vendor/bin/phpcs --standard=MO4 path/to/my/file.php
  5. Optionally, you might set MO4 as default coding standard

    ./vendor/bin/phpcs --config-set default_standard MO4

Troubleshooting

If phpcs complains that MO4 is not installed, please check the installed coding standards with phpcs -i and that installed_paths is set correctly with phpcs --config-show

Dependencies

Contributing

See CONTRIBUTING.md for information.

License

This project is licensed under the MIT license. See the LICENSE file for details.


All versions of mo4-coding-standard with dependencies

PHP Build Version
Package Version
Requires php Version ~7.2 || ~8.0
dealerdirect/phpcodesniffer-composer-installer Version ~0.7 || ~1.0
escapestudios/symfony2-coding-standard Version ^3.10.0
slevomat/coding-standard Version ^8.14
squizlabs/php_codesniffer Version ^3.8.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 mayflower/mo4-coding-standard contains the following files

Loading the files please wait ....