PHPackages                             philippwitzmann/codingstandard - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. philippwitzmann/codingstandard

ActivePhpcodesniffer-standard[PSR &amp; Standards](/categories/psr-standards)

philippwitzmann/codingstandard
==============================

This is my coding standard adapted from sparhandy/codingstandard.

3.0.0.2(6y ago)08083BSD-3-ClausePHPPHP &gt;=7.3

Since Jul 18Pushed 6y agoCompare

[ Source](https://github.com/PhilippWitzmann/CodingStandard)[ Packagist](https://packagist.org/packages/philippwitzmann/codingstandard)[ Docs](https://github.com/PhilippWitzmann/CodingStandard)[ RSS](/packages/philippwitzmann-codingstandard/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (7)Versions (29)Used By (3)

[![Build Status](https://camo.githubusercontent.com/d05d2ac8171e5db7e72dec43cec43a3a6d3cbacbbe71a5390ec363e646cf978e/68747470733a2f2f7472617669732d63692e6f72672f5068696c6970705769747a6d616e6e2f436f64696e675374616e646172642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/PhilippWitzmann/CodingStandard) ![Github Releases](https://camo.githubusercontent.com/dfdae8d09dfc4d46a1c84240070a641e44c164e6750688e0b42779252ade6443/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f5068696c6970705769747a6d616e6e2f436f64696e675374616e646172642f6c61746573742f746f74616c2e737667) ![Release](https://camo.githubusercontent.com/ad22df61c2c9c70140109b45f97a6ccb9940b244d86d1404c5c7e76d64c32677/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f5068696c6970705769747a6d616e6e2f436f64696e675374616e646172642e737667) ![Packagist](https://camo.githubusercontent.com/a428d12eef48d5a0241d6873984b4adce2599345ae64efe33a9fadc306e106fb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f5068696c6970705769747a6d616e6e2f436f64696e675374616e646172642e737667)

Coding Standard
===============

[](#coding-standard)

This repository contains all necessary files to configure PHP Code Sniffer and PHP Mess Detector.

Installation with composer
--------------------------

[](#installation-with-composer)

For now you have to use the dev-master version.

```
composer require "philippwitzmann/codingstandard" "~2"
```

Usage
-----

[](#usage)

### From Terminal (Cli)

[](#from-terminal-cli)

#### PHP Code Sniffer

[](#php-code-sniffer)

To execute PHP Code Sniffer do the following.

```
./vendor/bin/phpcs --extensions=php --standard=./vendor/philippwitzmann/codingstandard/src/phpcs/Production/ruleset.xml ./path/to ./your/sources
```

#### PHP Mess Detector

[](#php-mess-detector)

To execute PHP Mess Detector do the following.

```
./vendor/bin/phpmd ./path/to ./your/sources text ./vendor/philippwitzmann/codingstandard/src/phpmd/phpmd.xml --suffixes php
```

#### PHPStan

[](#phpstan)

To execute PHPStan do the following.

```
./vendor/bin/phpstan analyse ./path/to ./your/sources
```

### Travis-CI configuration

[](#travis-ci-configuration)

For use in your Travis-Ci configuration file just adapt the following example and save it to .travis.yml in your root directory.

```
language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - 7.0

matrix:
  allow_failures:
    - php: 7.0

before_script:
  - composer self-update

install: travis_retry composer update

script:
  - ./vendor/bin/phpmd ./path/to ./your/sources text ./configuration/phpmd/phpmd.xml --suffixes php
  - ./vendor/bin/phpcs --extensions=php --standard=./configuration/phpcs/Production/ruleset.xml ./path/to ./your/sources

```

How to contribute
=================

[](#how-to-contribute)

If you want to contribute to the standard here is how it works.

- Create a fork of PhilippWitzmann/CodingStandard.
- Create your branch from master and commit your changes.
- Push your branch to your fork.
- Create a pull request on GitHub.
- Discuss your pull request with us.
- Our devs will then merge or close the pull request.

Acknowledgements
================

[](#acknowledgements)

This would not be possible without the tremendous work of the good people at [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer) and [PHP Mess Detector](https://github.com/phpmd/phpmd) and of course the authors annotated in the source files. Also check out the original version of this standard over at the amazing people from [Sparhandy](https://github.com/Sparhandy/CodingStandard)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~23 days

Recently: every ~124 days

Total

25

Last Release

2312d ago

Major Versions

0.1 → 1.02018-08-30

1.0.1.2 → 3.0.02019-02-08

PHP version history (2 changes)2.0.2PHP &gt;=7.0

3.0.0PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/36b7e5183f1f5da9648653b84421f6fc9e05845222ceea8b3b541ec7e2b01faa?d=identicon)[PhilippWitzmann](/maintainers/PhilippWitzmann)

---

Top Contributors

[![sk-sparhandy](https://avatars.githubusercontent.com/u/7532845?v=4)](https://github.com/sk-sparhandy "sk-sparhandy (8 commits)")[![d1m1-87](https://avatars.githubusercontent.com/u/31273041?v=4)](https://github.com/d1m1-87 "d1m1-87 (1 commits)")

---

Tags

standardsphpcs

### Embed Badge

![Health badge](/badges/philippwitzmann-codingstandard/health.svg)

```
[![Health](https://phpackages.com/badges/philippwitzmann-codingstandard/health.svg)](https://phpackages.com/packages/philippwitzmann-codingstandard)
```

###  Alternatives

[phpcompatibility/php-compatibility

A set of sniffs for PHP\_CodeSniffer that checks for PHP cross-version compatibility.

2.3k74.3M1.3k](/packages/phpcompatibility-php-compatibility)[automattic/vipwpcs

PHP\_CodeSniffer rules (sniffs) to enforce WordPress VIP minimum coding conventions

25510.2M145](/packages/automattic-vipwpcs)[yoast/yoastcs

PHP\_CodeSniffer rules for Yoast projects

221.1M29](/packages/yoast-yoastcs)[mayflower/mo4-coding-standard

PHP CodeSniffer ruleset implementing the MO4 coding standards extending the Symfony coding standards.

17508.3k5](/packages/mayflower-mo4-coding-standard)[drupal/coder

Coder is a library to review Drupal code.

3043.6M461](/packages/drupal-coder)[wptrt/wpthemereview

PHP\_CodeSniffer rules (sniffs) to verify theme compliance with the rules for theme hosting on wordpress.org

217736.5k29](/packages/wptrt-wpthemereview)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
