PHPackages                             jobilla/coding-rules - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. jobilla/coding-rules

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jobilla/coding-rules
====================

Jobilla's general code styling rules for different tools

v2.0(4y ago)24.8k1Apache-2.0

Since Feb 28Pushed 4y ago16 watchersCompare

[ Source](https://github.com/jobilla/coding-rules)[ Packagist](https://packagist.org/packages/jobilla/coding-rules)[ Docs](https://github.com/jobilla/coding-rules)[ RSS](/packages/jobilla-coding-rules/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

Jobilla's code quality inspections tools' configurations
--------------------------------------------------------

[](#jobillas-code-quality-inspections-tools-configurations)

### Full QA set for PHP code includes the following tools

[](#full-qa-set-for-php-code-includes-the-following-tools)

- PHPUNIT ()
- PHPCS ([https://github.com/squizlabs/PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer))
- PHPMD ()
- PHPCPD ()
- PHPLOC ()

### Recommended usage

[](#recommended-usage)

Internally we're running automatic checks using a continuous integration server (Bamboo), but basically any continuous integration server should be capable of getting the job done. (highly recommended)

You should also be able to hook the tools into the text-editor / IDE of your choice. Below are some examples that our in-house developer team prefers.

#### PHPMD Plugins

[](#phpmd-plugins)

#### PHPCS Plugins

[](#phpcs-plugins)

### Installing &amp; running the checks

[](#installing--running-the-checks)

- Clone the repository / include into your project's composer.json
- If including via composer, run `composer update` to install the configuration files into your `vendor` folder
- Remember to include desired QA tools into your main projects `require-dev` part in composer.json, in order to use the actual tools + FG custom configuration files
- Example from our internal projects' composer.json

```
    "require-dev": {
        "phpunit/phpunit": "~4.0",
        "squizlabs/php_codesniffer": "2.*",
        "phpmd/phpmd" : "@stable",
        "phploc/phploc": "*",
        "sebastian/phpcpd": "*",
        "jobilla/coding-rules": "dev-master"
        },
    "repositories": [
        {
            "type": "vcs",
            "url": "git@github.com:jobilla/coding-rules.git"
        }
    ]

```

- Run the tools via CLI or integrate into your development tools
- Running via CLI example:

```
$ vendor/bin/phpmd --reportfile ./phpmd-report.html app/ html vendor/jobilla/coding-rules/phpmd/ruleset.xml
$ vendor/bin/phpcs --standard=./vendor/jobilla/coding-rules/phpcs/ruleset.xml --report-file=./phpcs-report.txt app/
$ vendor/bin/phpcpd app/ > ./phpcpd-report.txt
$ vendor/bin/phploc app/ > ./phploc-report.txt
$ vendor/bin/phpunit > ./phpunit-report.txt

```

### Fixing code styling errors automatically

[](#fixing-code-styling-errors-automatically)

PHPCS ships with an executable called `phpcbf`, which allows automatically fixing some of the violations detected by the CodeSniffer. More info can be found through this link: [https://github.com/squizlabs/PHP\_CodeSniffer/wiki/Fixing-Errors-Automatically](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Fixing-Errors-Automatically)

Example of running `phpcbf` via CLI:

```
$ vendor/bin/phpcbf --standard=vendor/jobilla/coding-rules/phpcs/ruleset.xml app

```

***The following repositories &amp; authors' work have been used as a base for individual parts of the configuration, or have heavily influenced the end result:***

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~1254 days

Total

2

Last Release

1746d ago

Major Versions

v1.0 → v2.02021-08-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f7c369fe9e0f2394fa77dfd669ab045a4743a517fc08dcfdbc65dbe17928178?d=identicon)[phroggyy](/maintainers/phroggyy)

![](https://avatars.githubusercontent.com/u/2135597?v=4)[Hakan Aktas](/maintainers/hkan)[@hkan](https://github.com/hkan)

---

Top Contributors

[![phroggyy](https://avatars.githubusercontent.com/u/7256451?v=4)](https://github.com/phroggyy "phroggyy (2 commits)")[![andvla](https://avatars.githubusercontent.com/u/12616998?v=4)](https://github.com/andvla "andvla (1 commits)")[![appelsiini](https://avatars.githubusercontent.com/u/8483111?v=4)](https://github.com/appelsiini "appelsiini (1 commits)")[![Vikingmaster](https://avatars.githubusercontent.com/u/173030890?v=4)](https://github.com/Vikingmaster "Vikingmaster (1 commits)")

---

Tags

phpcscode standardsJobillaphp code styleclean php code

### Embed Badge

![Health badge](/badges/jobilla-coding-rules/health.svg)

```
[![Health](https://phpackages.com/badges/jobilla-coding-rules/health.svg)](https://phpackages.com/packages/jobilla-coding-rules)
```

###  Alternatives

[phpcsstandards/phpcsutils

A suite of utility functions for use with PHP\_CodeSniffer

6233.4M58](/packages/phpcsstandards-phpcsutils)[syde/phpcs

Syde PHP coding standards for WordPress projects.

1019.7k7](/packages/syde-phpcs)[secl-group/phpcs-secl-standard

A PHP\_CodeSniffer maintainability standard for Secl Group applications

149.7k](/packages/secl-group-phpcs-secl-standard)

PHPackages © 2026

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