PHPackages                             salient/phpstan - 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. salient/phpstan

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

salient/phpstan
===============

The PHPStan component of the Salient toolkit

v0.99.81(7mo ago)010.2k↑853.3%2MITPHPPHP &gt;=7.4

Since Jul 20Pushed 7mo agoCompare

[ Source](https://github.com/salient-labs/toolkit-phpstan)[ Packagist](https://packagist.org/packages/salient/phpstan)[ RSS](/packages/salient-phpstan/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependencies (2)Versions (51)Used By (2)

salient/phpstan
===============

[](#salientphpstan)

> The PHPStan component of the [Salient toolkit](https://github.com/salient-labs/toolkit)

 [![Latest Stable Version](https://camo.githubusercontent.com/b978c1049c392d826a98e1793e98d0cfc71599bbd0d2ce65c09d161b8d1f70c0/68747470733a2f2f706f7365722e707567782e6f72672f73616c69656e742f746f6f6c6b69742f76)](https://packagist.org/packages/salient/toolkit) [![License](https://camo.githubusercontent.com/a69dc21b66521958734e54526bc047b3502cfcec0f337643a14479da7c36506d/68747470733a2f2f706f7365722e707567782e6f72672f73616c69656e742f746f6f6c6b69742f6c6963656e7365)](https://packagist.org/packages/salient/toolkit) [![CI Status](https://github.com/salient-labs/toolkit/actions/workflows/ci.yml/badge.svg)](https://github.com/salient-labs/toolkit/actions) [![Code Coverage](https://camo.githubusercontent.com/9cd7526674c8d5a9d2c8f9150467975632309756513e52ece90427cd2ca97203/68747470733a2f2f636f6465636f762e696f2f67682f73616c69656e742d6c6162732f746f6f6c6b69742f67726170682f62616467652e7376673f746f6b656e3d59306c395a6545747249)](https://codecov.io/gh/salient-labs/toolkit)

---

`salient/phpstan` provides PHPStan extensions for development with the Salient toolkit.

Extensions
----------

[](#extensions)

### Dynamic return type

[](#dynamic-return-type)

ExtensionMethod`ArrExtendReturnTypeExtension`[Arr::extend()](https://salient-labs.github.io/toolkit/Salient.Utility.Arr.html#_extend)`ArrFlattenReturnTypeExtension`[Arr::flatten()](https://salient-labs.github.io/toolkit/Salient.Utility.Arr.html#_flatten)`ArrWhereNotEmptyReturnTypeExtension`[Arr::whereNotEmpty()](https://salient-labs.github.io/toolkit/Salient.Utility.Arr.html#_whereNotEmpty)`ArrWhereNotNullReturnTypeExtension`[Arr::whereNotNull()](https://salient-labs.github.io/toolkit/Salient.Utility.Arr.html#_whereNotNull)`GetCoalesceReturnTypeExtension`[Get::coalesce()](https://salient-labs.github.io/toolkit/Salient.Utility.Get.html#_coalesce)`StrCoalesceReturnTypeExtension`[Str::coalesce()](https://salient-labs.github.io/toolkit/Salient.Utility.Str.html#_coalesce)### Custom rule

[](#custom-rule)

ExtensionDescriptionError identifiers`ContainerRule`Checks calls to [ContainerInterface](https://salient-labs.github.io/toolkit/Salient.Contract.Container.ContainerInterface.html) methods`salient.service.type``GetCoalesceRule`Checks for unnecessary use of [Get::coalesce()](https://salient-labs.github.io/toolkit/Salient.Utility.Get.html#_coalesce)`salient.needless.coalesce``ImmutableTraitRule`Checks calls to [ImmutableTrait](https://salient-labs.github.io/toolkit/Salient.Core.Concern.ImmutableTrait.html) methods `with()` and `without()``salient.property.notFound`
`salient.property.private`
`salient.property.type`### Always-read and written properties

[](#always-read-and-written-properties)

ExtensionDescription`ImmutableTraitReadWritePropertiesExtension`Properties visible to [ImmutableTrait](https://salient-labs.github.io/toolkit/Salient.Core.Concern.ImmutableTrait.html) methods are always read and writtenDocumentation
-------------

[](#documentation)

[API documentation](https://salient-labs.github.io/toolkit/namespace-Salient.PHPStan.html) for `salient/phpstan` tracks the `main` branch of the toolkit's [GitHub repository](https://github.com/salient-labs/toolkit), where further documentation can also be found.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance63

Regular maintenance activity

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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

Recently: every ~65 days

Total

50

Last Release

228d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2563783?v=4)[Luke Arms](/maintainers/lkrms)[@lkrms](https://github.com/lkrms)

---

Top Contributors

[![lkrms](https://avatars.githubusercontent.com/u/2563783?v=4)](https://github.com/lkrms "lkrms (34 commits)")

### Embed Badge

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

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

###  Alternatives

[larastan/larastan

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

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

Symfony Framework extensions and rules for PHPStan

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

Doctrine extensions for PHPStan

67272.8M1.4k](/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.5M91](/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.

33422.6M550](/packages/spaze-phpstan-disallowed-calls)[tomasvotruba/cognitive-complexity

PHPStan rules to measure cognitive complexity of your classes and methods

1635.6M289](/packages/tomasvotruba-cognitive-complexity)

PHPackages © 2026

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