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(6mo ago)08.0k↑66.7%2MITPHPPHP &gt;=7.4

Since Jul 20Pushed 5mo agoCompare

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

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

39

—

LowBetter than 86% of packages

Maintenance69

Regular maintenance activity

Popularity23

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

183d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bcd9f9fc77a44c95d6abf456a101d31d558bc6d7d2e7e3a2c1f4dd679ced9707?d=identicon)[lkrms](/maintainers/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.4k43.5M5.2k](/packages/larastan-larastan)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

78768.9M1.5k](/packages/phpstan-phpstan-symfony)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

66766.6M1.1k](/packages/phpstan-phpstan-doctrine)[phpat/phpat

PHP Architecture Tester

1.2k3.5M32](/packages/phpat-phpat)[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.

33320.0M375](/packages/spaze-phpstan-disallowed-calls)[mglaman/phpstan-drupal

Drupal extension and rules for PHPStan

20829.0M124](/packages/mglaman-phpstan-drupal)

PHPackages © 2026

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