https://github.com/backdrop-ops/phpcs
Backdrop PHP coding standards.
https://github.com/backdrop-ops/phpcs
Last synced: 2 months ago
JSON representation
Backdrop PHP coding standards.
- Host: GitHub
- URL: https://github.com/backdrop-ops/phpcs
- Owner: backdrop-ops
- License: gpl-2.0
- Created: 2022-07-28T22:07:24.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2026-04-17T04:16:38.000Z (2 months ago)
- Last Synced: 2026-04-17T05:37:06.910Z (2 months ago)
- Language: PHP
- Size: 71.3 KB
- Stars: 2
- Watchers: 8
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Backdrop Coding Standards
See the [official documentation](https://docs.backdropcms.org/php-standards)
for Backdrop PHP coding standards.
## Installation
Work in progress, see https://github.com/backdrop/backdrop-issues/issues/5245
For now you can simply download the zip file or clone it locally. Put it
somewhere *outside* your Backdrop install.
## Usage
There are several ways to install the `phpcs` commandline tool in your dev
environment.
Some Linux distributions provide a package (e.g. Debian php-codesniffer).
Make sure, the version is at least 3.5.
If you want to run it on PHP 8.1, it has to be at least 3.7.1.
But you can also download phpcs [from Github](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases)
and put it in your $PATH.
With the "standard" parameter you can now tell phpcs, where the standard is
located. Point it to the directory that contains the ruleset.xml file.
Example usage to run checks in the current directory.
```
phpcs --standard=/path/to/phpcs/Backdrop .
```
See full phpcs documentation in their Wiki:
https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki
Or run `phpcs --help` for a short overview.
## Issues
Bugs and feature requests should be reported in the
[Issue Queue](https://github.com/backdrop-ops/phpcs/issues).
## Maintainers
- [Indigoxela](https://github.com/indigoxela)
- Additional maintainers welcome!
## Credits
Created for Backdrop by Indigoxela.
[PHP_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) is a project
formerly maintained by Squiz Labs, now by the PHPCSStandards organization.
It's licensed under BSD-3-Clause.
Several sniffs for the Backdrop ruleset have been forked from
[Drupal Coder](https://github.com/pfrenssen/coder), which is licensed under
GPL-2.0-or-later.
## License
This project is GPL v2 software. See the LICENSE.txt file in this directory for complete text.