PHPackages                             geolid/phpcs - 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. geolid/phpcs

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

geolid/phpcs
============

Official Geolid coding standard.

12.0.0(4y ago)830.0k—0%3[1 issues](https://github.com/Geolid/phpcs/issues)[2 PRs](https://github.com/Geolid/phpcs/pulls)MITPHPPHP ^7.3|^8.0

Since Oct 27Pushed 3y ago13 watchersCompare

[ Source](https://github.com/Geolid/phpcs)[ Packagist](https://packagist.org/packages/geolid/phpcs)[ Docs](https://github.com/Geolid/phpcs)[ RSS](/packages/geolid-phpcs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (30)Used By (0)

Geolid PHP Coding Style [![Build Status](https://camo.githubusercontent.com/ec20e9d9de7261ebb1df8bad6d460fbdb08c8c7c05bbfcec10eb8333ad68dbb1/68747470733a2f2f7472617669732d63692e6f72672f47656f6c69642f70687063732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Geolid/phpcs)
===========================================================================================================================================================================================================================================================================================

[](#geolid-php-coding-style-)

PHPCS ruleset used at Geolid.

Installation
------------

[](#installation)

```
composer require --dev geolid/phpcs

```

You only need this package, no need to require manually `squizlabs/php_codesniffer` or `friendsofphp/php-cs-fixer`.

After require, copy in your path : `phpcs.xml.dist` and rename to `phpcs.xml̀`or add the rule below in your existing `phpcs.xml`.

```

```

Copy in your path the `.php_cs.dist` file.

Usage
-----

[](#usage)

Use php\_codesniffer normally.

```
vendor/bin/phpcs

```

Use php-cs-fixer normally.

```
vendor/bin/php-cs-fixer fix

```

Description
-----------

[](#description)

We follow the PSR-2 coding style with additional rules.

Additional rules :
------------------

[](#additional-rules-)

### code quality

[](#code-quality)

- Add leading \\ before function invocation to speed up resolving.
- Parameters with a default null value needs ? before type declarations.
- No unused imports (`use` statements).
- Php must contains `declare(strict_types=1);` with one blank line between declaration and php open tag.
- No more 3 nesting identation levels.

### readability

[](#readability)

- Array must be in short syntax.
- One space around concatenation operator.
- One space after casting operator.
- Object instantiation must always be with parentheses.
- Must have blank line before return statement.
- Must have one space before return typehint. ```
    public function foo(): self {}
    ```
- Only one use per line for traits.
- No empty phpdoc

### PR readability

[](#pr-readability)

- Trailing comma : multiline arrays must have comma in all line.
- Trailing comma : multiline call must have comma in all line.

### naming

[](#naming)

- Prefix all abstract classes with Abstract except PHPUnit \*TestCase. (name of empty abstract not detected for moment).
- Suffix interfaces with Interface.
- Suffix traits with Trait.
- Suffix exceptions with Exception.

### PSR-12

[](#psr-12)

- Visibility MUST be declared on all constants.
- Private methods and properties MUST not be prefixed with an underscore.

Testing
-------

[](#testing)

```
composer test

```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 52.5% 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 ~58 days

Recently: every ~176 days

Total

27

Last Release

1608d ago

Major Versions

7.0.0 → 8.0.02019-02-28

8.0.0 → 9.0.02019-04-01

9.0.3 → 10.0.02019-05-23

10.1.0 → 11.0.02020-01-17

11.0.3 → 12.0.02021-12-22

PHP version history (4 changes)1.0.0PHP ^7.1

3.0.0PHP ^7.2

9.0.0PHP ^7.3

11.0.3PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/6ff52d78f4ac4938a3bf1cc42a7917e7c3db13e7d2227941fcefe0095ca867e8?d=identicon)[geolid](/maintainers/geolid)

---

Top Contributors

[![devster](https://avatars.githubusercontent.com/u/1135083?v=4)](https://github.com/devster "devster (21 commits)")[![ektarum](https://avatars.githubusercontent.com/u/5079406?v=4)](https://github.com/ektarum "ektarum (13 commits)")[![mnapoli](https://avatars.githubusercontent.com/u/720328?v=4)](https://github.com/mnapoli "mnapoli (3 commits)")[![chalasr](https://avatars.githubusercontent.com/u/7502063?v=4)](https://github.com/chalasr "chalasr (2 commits)")[![alborq](https://avatars.githubusercontent.com/u/937312?v=4)](https://github.com/alborq "alborq (1 commits)")

---

Tags

standardsphpcscoding-style

### Embed Badge

![Health badge](/badges/geolid-phpcs/health.svg)

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

###  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)[mayflower/mo4-coding-standard

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

17508.3k5](/packages/mayflower-mo4-coding-standard)[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)[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)
