PHPackages                             sincos/php-coding-standards - 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. sincos/php-coding-standards

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

sincos/php-coding-standards
===========================

Sincos PHP Coding Standards

2.0.0(7y ago)019.8k1[6 PRs](https://github.com/SincosSoftware/php-coding-standards/pulls)MITPHP ^7.1

Since Oct 3Pushed 4y ago2 watchersCompare

[ Source](https://github.com/SincosSoftware/php-coding-standards)[ Packagist](https://packagist.org/packages/sincos/php-coding-standards)[ Docs](http://24nettbutikk.no)[ RSS](/packages/sincos-php-coding-standards/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (4)Versions (8)Used By (0)

PHP Coding standards
====================

[](#php-coding-standards)

Common PHP coding standards for use in our PHP projects.

Setup
-----

[](#setup)

In a PHP project, do the following to set up the coding standards check:

#### Require the package

[](#require-the-package)

`composer require --dev sincos/php-coding-standards`

#### Add an empty tests output folder

[](#add-an-empty-tests-output-folder)

```
mkdir tests/_output
touch tests/_output/.gitkeep

```

PHPCS and PHPMD will dump their reports in this folder.

#### Ignore files in the new \_output folder

[](#ignore-files-in-the-new-_output-folder)

Add `tests/_output` to your `.gitignore` file.

#### Add phpcs.xml

[](#add-phpcsxml)

Here is an example file:

```

    ./src

```

#### Add phpmd.xml

[](#add-phpmdxml)

```

        A nice description here

    vendor

```

#### Add a Makefile

[](#add-a-makefile)

This is optional, but makes the commands easier to run with sensible defaults:

After adding this to `Makefile`, you can run for instance `make lint`:

```
.DEFAULT_GOAL := help
.PHONY: help

help:
	@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort

phpcs: ## Check PHP Code Sniffer rules. (Optional parameter PARAMS="-additional --params")
	vendor/bin/phpcs --standard=phpcs.xml -d date.timezone=Europe/Oslo --report=junit --report-file=tests/_output/phpcs.xml -d memory_limit=512M $(PARAMS) -s

phpmd: ## Check PHP Mess Detector rules.
	vendor/bin/phpmd . xml phpmd.xml --suffixes php --reportfile tests/_output/phpmd.xml -d memory_limit=512M

phpcbf: ## Run PHPCBF to fix code
	vendor/bin/phpcbf .

lint: ## Run phpcs and phpmd (Optional parameter "FIX=true" added phpcbf on start)
ifdef FIX
	-make phpcbf
endif
	make phpcs
	make phpmd
```

#### Add all this sauce to your CI

[](#add-all-this-sauce-to-your-ci)

Here is an example from another project using Circle CI, where we add the following to `.circleci/config.yml`:

```
# PHP CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-php/ for more details
#
version: 2
jobs:
  build:
    docker:
      - image: circleci/php:7.2.8-node-browsers

    steps:
      - checkout
      - run: sudo composer self-update
      - run: composer install
      - run: ./vendor/bin/phpunit
      - run: make lint
      - store_test_results:
          path: tests/_output
      - store_artifacts:
          path: tests/_output
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 78.1% 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 ~4 days

Total

2

Last Release

2776d ago

Major Versions

1.0.2 → 2.0.02018-10-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/be2a1e5389d82627042455f10e1336206572bfe830fb58020d386b80559d624b?d=identicon)[torkil](/maintainers/torkil)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (25 commits)")[![torkiljohnsen](https://avatars.githubusercontent.com/u/318089?v=4)](https://github.com/torkiljohnsen "torkiljohnsen (7 commits)")

### Embed Badge

![Health badge](/badges/sincos-php-coding-standards/health.svg)

```
[![Health](https://phpackages.com/badges/sincos-php-coding-standards/health.svg)](https://phpackages.com/packages/sincos-php-coding-standards)
```

###  Alternatives

[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)

PHPackages © 2026

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