The StyleCI Docs

Welcome to the StyleCI docs. You'll find comprehensive guides and documentation to help you start working with StyleCI as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Guides

PHP Configuration

This page will guide your through our simple configuration process.

StyleCI provides two ways to configure your repos. You can apply configuration either by committing a .styleci.yml file to the root of your repo, or by visiting the settings page for your repo, and applying it there.

If you want to use our header checking facility, you must configure that part on the settings page as that's the only part of the configuration not available through the .styleci.yml file.

Watch Out!

Setting configuration through the browser will override all config set in the .styleci.yml file.

Fixers and Presets

Our config file allows you to set a preset, and then enable/disable any fixers on top of that preset. Our default preset is recommended, and if you provide no config, we will use that preset to check your code. A complete list of presets is available here, and a complete list of fixers is available here.

Risky Fixers

Allowing the use of "risky" heuristic fixers is enabled by default in order to take advantage of what they have to offer. Care should be taken here, however. If you are looking to enable automatic fix PR sending and merging, then you may want to disallow risky fixers.

This is the risky option in the config.


Here is an example config file that uses all our options:

preset: recommended

risky: false

  - long_array_syntax
  - strict
  - unalign_double_arrow

  - align_double_arrow
  - short_array_syntax

    - "tests"
    - "*.php"
    - "*Stub.php"
    - "Foo"
    - "config"
    - "foo/Stuff"
    - "libraries"
    - "< 3"

Please note that we do not recommend actually copy/pasting this example file for use as it's pretty useless for most applications, but it's useful to demonstrate all the available options.

Need a hand?

Feel free to contact us at if you have any questions.

PHP Configuration

This page will guide your through our simple configuration process.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.