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

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

apermo/apermo-coding-standards
==============================

Shared PHPCS coding standards for WordPress projects by Apermo.

v2.6.3(1mo ago)01.2k↑1400%[9 issues](https://github.com/apermo/apermo-coding-standards/issues)6MITPHPPHP &gt;=7.4CI passing

Since Feb 14Pushed 1mo agoCompare

[ Source](https://github.com/apermo/apermo-coding-standards)[ Packagist](https://packagist.org/packages/apermo/apermo-coding-standards)[ Docs](https://github.com/apermo/apermo-coding-standards)[ RSS](/packages/apermo-apermo-coding-standards/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (18)Versions (26)Used By (6)

Apermo WordPress Coding Standards
=================================

[](#apermo-wordpress-coding-standards)

[![CI](https://github.com/apermo/apermo-coding-standards/actions/workflows/ci.yml/badge.svg)](https://github.com/apermo/apermo-coding-standards/actions/workflows/ci.yml)[![codecov](https://camo.githubusercontent.com/ee7146efe838fc4b659cbf86a86d6871688590a1b02c5202731b91d1b4ba6a2c/68747470733a2f2f636f6465636f762e696f2f67682f617065726d6f2f617065726d6f2d636f64696e672d7374616e64617264732f67726170682f62616467652e737667)](https://codecov.io/gh/apermo/apermo-coding-standards)[![Packagist Version](https://camo.githubusercontent.com/73d875bb3e44067e27a95bda7ea72b7f3f5956be081f5df4ff8f425898b18d16/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617065726d6f2f617065726d6f2d636f64696e672d7374616e6461726473)](https://packagist.org/packages/apermo/apermo-coding-standards)[![PHP Version](https://camo.githubusercontent.com/0ab55af63220244313f62dcdf7d652e0728aafa2569582154b9d86102eea43af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f617065726d6f2f617065726d6f2d636f64696e672d7374616e64617264732f706870)](https://packagist.org/packages/apermo/apermo-coding-standards)[![License](https://camo.githubusercontent.com/78bd6347f7064e5b49815a12c9ea362dd989e393d9f4c626e75ff3dcc0bf2d4b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f617065726d6f2f617065726d6f2d636f64696e672d7374616e6461726473)](LICENSE)

Shared [PHPCS](https://github.com/PHPCSStandards/PHP_CodeSniffer) ruleset for WordPress projects. Combines WordPress Coding Standards, Slevomat type hints, YoastCS, and PHPCompatibility into a single reusable standard.

Requirements
------------

[](#requirements)

- PHP 7.4+

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

[](#installation)

```
composer require --dev apermo/apermo-coding-standards
```

The [Composer Installer Plugin](https://github.com/PHPCSStandards/composer-installer) automatically registers the standard with PHPCS.

Usage
-----

[](#usage)

Reference the `Apermo` standard in your project's `phpcs.xml`:

```

    .

```

Then run:

```
vendor/bin/phpcs
```

What's Included
---------------

[](#whats-included)

StandardPurpose[WordPress Coding Standards](https://github.com/WordPress/WordPress-Coding-Standards)WordPress PHP conventions[Slevomat Coding Standard](https://github.com/slevomat/coding-standard)Type hint enforcement[YoastCS](https://github.com/Yoast/yoastcs)Additional quality rules[PHPCompatibility](https://github.com/PHPCompatibility/PHPCompatibilityWP)PHP version compatibility checks### Notable Opinions

[](#notable-opinions)

- Short array syntax (`[]`) enforced, long array syntax (`array()`) forbidden
- Short ternary operators allowed
- Yoda conditions disallowed
- Short open echo tags (`
