PHPackages                             secl-group/phpcs-secl-standard - 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. secl-group/phpcs-secl-standard

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

secl-group/phpcs-secl-standard
==============================

A PHP\_CodeSniffer maintainability standard for Secl Group applications

v1.0.2(9y ago)149.7k1[1 issues](https://github.com/SECL-Group/phpcs-secl-standard/issues)BSDPHP

Since Sep 20Pushed 9y ago3 watchersCompare

[ Source](https://github.com/SECL-Group/phpcs-secl-standard)[ Packagist](https://packagist.org/packages/secl-group/phpcs-secl-standard)[ Docs](https://github.com/SECL-Group/phpcs-secl-standard)[ RSS](/packages/secl-group-phpcs-secl-standard/feed)WikiDiscussions master Synced 3w ago

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

Secl Group PHP\_CodeSniffer Maintainability Coding Standard
===========================================================

[](#secl-group-php_codesniffer-maintainability-coding-standard)

PHP\_CodeSniffer maintainability standard for [Secl Group applications](http://seclgroup.com/).

Everyone is probably familiar with a situation in which, with the development of a project, the implementation of new functions becomes more time-consuming and expensive. And, unfortunately, it often happens that the price starts to significantly outweigh the possible benefit that can be obtained from the implementation of the function.

Having analyzed a number of projects, the experts of Software Improvement Group (SIG) developed a set of simple principles and rules with the help of which you can make the situation much better. Some of these principles can be easily controlled in automatic mode. For this purpose, special software was created for such languages as Java and C#. We propose the easiest implementation of automatic control for PHP development. In this option, we have carried out control of these basic principles:

- A function should be no longer than 15 lines of code;
- The cyclomatic complexity of a function should not exceed 5;
- Functions should not take more than 4 input arguments.

Once such control has been implemented in our company, the quality of development has significantly improved. Therefore, the code has become much easier to understand and maintain.

We propose you a basic option of the solution for automatic control. The standard can be easily integrated into a version control system. We recommend using it combined with other stylistic standards of your company.

This project was based on the principles provided by Joost Visser in his book [Building Maintainable Software](https://github.com/oreillymedia/building_maintainable_software) (ISBN print: 978-1-4919-5352-5, ISBN eBook: 978-1-4919-5348-8). For more information about software maintainability, we recommend that you read the book.

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

[](#installation)

This coding standard can be installed via composer or used in your PHP\_CodeSniffer install over PECL. Both ways are described below, but the way of using composer is recommended:

### Using Composer

[](#using-composer)

1. Install The standard as a dependency of your composer based project (It will install a composer version of PHP\_CodeSniffer as a dependency):

    ```
     $ php composer.phar require --dev secl-group/phpcs-secl-standard:~1.0.0

    ```
2. Profit!

    ```
     $ bin/phpcs --standard=vendor/secl-group/phpcs-secl-standard/secl-group/phpcs/Secl --extensions=php src/

    ```

### Using PEAR

[](#using-pear)

1. Install PHP\_CodeSniffer:

    ```
     $ pear install PHP_CodeSniffer

    ```
2. Find your PEAR directory:

    ```
     $ pear config-show | grep php_dir

    ```
3. Copy, symlink or check out this repository to `Secl` folder inside the phpcs `Standards` directory:

    ```
     $ cd /path/to/pear/PHP/CodeSniffer/Standards
     $ git clone https://github.com/SECL-Group/phpcs-secl-standard Secl

    ```
4. Set Secl as your default coding standard if you want:

    ```
     $ phpcs --config-set default_standard Secl

    ```
5. Profit!

    ```
     $ phpcs --standard=Secl --extensions=php src/

    ```

Contributing
============

[](#contributing)

If you do contribute code to these Sniffs, please make sure it conforms to the PEAR coding standards and that the Secl-coding-standard unit tests are still passed.

To check the coding standard, run from the Secl-coding-standard source root:

```
$ phpcs --ignore=*/tests/* --standard=Secl . -n

```

For unit-tests
==============

[](#for-unit-tests)

```
$ composer install
$ cp phpunit.xml.dist phpunit.xml

```

Make links to a vendor directory, use only absolute paths – otherwise, CORRECT the LINKS!

```
$ mkdir /path/to/phpcs/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Secl
  ln -sf /path/to/phpcs/Sniffs /path/to/phpcs/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Secl/Sniffs
  ln -sf /path/to/phpcs/Tests /path/to/phpcs/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Secl/Tests
  ln -sf /path/to/phpcs/ruleset.xml /path/to/phpcs/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Secl/ruleset.xml
  ln -sf /path/to/phpcs/phpunit.xml /path/to/phpcs/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Secl/phpunit.xml

```

The unit tests are run from the Secl directory which includes the vendor directory.

```
$ vendor/bin/phpunit -c phpunit.xml vendor/squizlabs/php_codesniffer/tests/AllTests.php

```

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~10 days

Total

3

Last Release

3550d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11733530?v=4)[Nikita Semenov](/maintainers/SECL)[@SECL](https://github.com/SECL)

---

Top Contributors

[![h-sn](https://avatars.githubusercontent.com/u/5969823?v=4)](https://github.com/h-sn "h-sn (7 commits)")

---

Tags

phpcsCoding StandardmaintainabilitySecl

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/secl-group-phpcs-secl-standard/health.svg)

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

###  Alternatives

[phpcsstandards/phpcsutils

A suite of utility functions for use with PHP\_CodeSniffer

6337.7M90](/packages/phpcsstandards-phpcsutils)[laminas/laminas-coding-standard

Laminas Coding Standard

341.8M594](/packages/laminas-laminas-coding-standard)[drupol/drupal-conventions

Drupal conventions for coding.

2422.7k1](/packages/drupol-drupal-conventions)[ramsey/coding-standard

A common coding standard for Ramsey's PHP libraries.

1095.3k40](/packages/ramsey-coding-standard)[forrest79/phpcs-ignores

PHPCS-Ignores provides functionality to use baseline or other ignoring for original PHPCS.

1141.7k17](/packages/forrest79-phpcs-ignores)[syde/phpcs

Syde PHP coding standards for WordPress projects.

1024.3k8](/packages/syde-phpcs)

PHPackages © 2026

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