PHPackages                             mhujer/phpstan-consistence - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. mhujer/phpstan-consistence

ActiveLibrary[Testing &amp; Quality](/categories/testing)

mhujer/phpstan-consistence
==========================

Custom PHPStan Rules for Consistence library

1.0(4y ago)749.1kMITPHPPHP ~8.0 || ~8.1CI failing

Since Dec 24Pushed 4y ago3 watchersCompare

[ Source](https://github.com/mhujer/phpstan-consistence)[ Packagist](https://packagist.org/packages/mhujer/phpstan-consistence)[ RSS](/packages/mhujer-phpstan-consistence/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (5)Versions (10)Used By (0)

Custom PHPStan Rules for Consistence library
============================================

[](#custom-phpstan-rules-for-consistence-library)

[![Build Status](https://camo.githubusercontent.com/1e57cf5195e1ccdf316243686dc63090aa69a36d3ed23da67f23000e611b9725/68747470733a2f2f7472617669732d63692e6f72672f6d68756a65722f7068707374616e2d636f6e73697374656e63652e737667)](https://travis-ci.org/mhujer/phpstan-consistence)[![Coverage Status](https://camo.githubusercontent.com/3b24b2bbc052eaffa2eaefdfcb4f16aafd4a534519f874508a511299dd3351e3/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d68756a65722f7068707374616e2d636f6e73697374656e63652f62616467652e737667)](https://coveralls.io/github/mhujer/phpstan-consistence)[![Latest Stable Version](https://camo.githubusercontent.com/97aea1560bb2b2ba5880c42c787222426334440ba7c371862873067d8a1d43a9/68747470733a2f2f706f7365722e707567782e6f72672f6d68756a65722f7068707374616e2d636f6e73697374656e63652f762f737461626c65)](https://packagist.org/packages/mhujer/phpstan-consistence)[![License](https://camo.githubusercontent.com/cb90a72a98f139b607d2f8b42bb0b82ad819843a31bb93d67a811ae32adf54a0/68747470733a2f2f706f7365722e707567782e6f72672f6d68756a65722f7068707374616e2d636f6e73697374656e63652f6c6963656e7365)](https://packagist.org/packages/mhujer/phpstan-consistence)

This repository provides following custom [PHPStan](https://github.com/phpstan/phpstan) rules for [Consistence library](https://github.com/consistence/consistence/)

- Check that no class extends `\Consistence\ObjectPrototype` or uses `\Consistence\Type\ObjectMixinTrait` somewhere in its hierarchy tree. The type of errors it prevents is caught by PHPStan so there is no need to extend/use anymore.
- Check that Consistence function wrappers (from `ArrayType`) are used for array manipulation

Usage
-----

[](#usage)

To use those rules, require them in [Composer](https://getcomposer.org/):

```
composer require --dev mhujer/phpstan-consistence
```

And include them in your project's PHPStan config:

```
includes:
    - vendor/mhujer/phpstan-consistence/rules.neon
```

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity78

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

Recently: every ~262 days

Total

9

Last Release

1699d ago

Major Versions

0.8 → 1.02021-11-05

PHP version history (4 changes)0.1PHP &gt;=7.1

0.7PHP ^7.2

0.8PHP ~7.4 || ~8.0

1.0PHP ~8.0 || ~8.1

### Community

Maintainers

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

---

Top Contributors

[![mhujer](https://avatars.githubusercontent.com/u/353372?v=4)](https://github.com/mhujer "mhujer (25 commits)")

---

Tags

phpphpstanphpstan-extensionphpstan-rulesstatic-analysis

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mhujer-phpstan-consistence/health.svg)

```
[![Health](https://phpackages.com/badges/mhujer-phpstan-consistence/health.svg)](https://phpackages.com/packages/mhujer-phpstan-consistence)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.5k55.4M7.8k](/packages/larastan-larastan)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

79475.7M2.0k](/packages/phpstan-phpstan-symfony)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

67272.8M1.3k](/packages/phpstan-phpstan-doctrine)[shipmonk/dead-code-detector

Dead code detector to find unused PHP code via PHPStan extension. Can automatically remove dead PHP code. Supports libraries like Symfony, Doctrine, PHPUnit etc. Detects dead cycles. Can detect dead code that is tested.

4853.1M87](/packages/shipmonk-dead-code-detector)[spaze/phpstan-disallowed-calls

PHPStan rules to detect disallowed method &amp; function calls, constant, namespace, attribute, property &amp; superglobal usages, with powerful rules to re-allow a call or a usage in places where it should be allowed.

33421.8M515](/packages/spaze-phpstan-disallowed-calls)[mglaman/phpstan-drupal

Drupal extension and rules for PHPStan

20731.4M169](/packages/mglaman-phpstan-drupal)

PHPackages © 2026

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