https://github.com/backdevs/php-coding-standard
Backdevs' PHP Coding Standard
https://github.com/backdevs/php-coding-standard
coding-standard php php8
Last synced: about 1 month ago
JSON representation
Backdevs' PHP Coding Standard
- Host: GitHub
- URL: https://github.com/backdevs/php-coding-standard
- Owner: backdevs
- License: mit
- Created: 2024-08-26T09:04:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-10-20T13:02:43.000Z (6 months ago)
- Last Synced: 2025-11-21T10:12:14.790Z (5 months ago)
- Topics: coding-standard, php, php8
- Language: PHP
- Homepage: https://packagist.org/packages/backdevs/coding-standard
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Backdevs' PHP Coding Standard
A [PHP_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) coding standard and other static analysis tools configuration files for Backdevs' PHP projects.
## Included default configurations
- [PHP_CodeSniffer](./phpcs/phpcs.xml)
- [PHP Mess Detector](./phpmd/phpmd.xml)
## Installation
Composer:
```shell
composer require --dev backdevs/coding-standard
```
## Usage
### PHP_CodeSniffer:
In your project's `phpcs.xml` file add the following line:
```xml
```
If you don't have a `phpcs.xml` file, here's an example for a Laravel project:
```xml
Backdevs Coding Standard.
app
bootstrap
config
database
routes
tests
cache/*
```
Now you should be able to run:
```shell
vendor/bin/phpcs
```
### PHP Mess Detector:
If you don't have the `phpmd/phpmd` package installed, you can install it by running:
```shell
composer require --dev phpmd/phpmd
```
Then, in your project's `phpmd.xml` file add the following line:
```xml
```
If you don't have a `phpmd.xml` file, here's a simple example:
```xml
Backdevs Coding Standard.
```
Now you can run:
```shell
vendor/bin/phpmd app,bootstrap,config,database,routes,tests text phpmd.xml
```