PHPackages                             ntzm/strict-casts-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. ntzm/strict-casts-phpstan

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

ntzm/strict-casts-phpstan
=========================

PHPStan rule to ensure you're using strict casts wherever possible

1.1.0(6y ago)211MITPHP

Since Jun 21Pushed 6y agoCompare

[ Source](https://github.com/ntzm/strict-casts-phpstan)[ Packagist](https://packagist.org/packages/ntzm/strict-casts-phpstan)[ RSS](/packages/ntzm-strict-casts-phpstan/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Strict Casts PHPStan Rule
=========================

[](#strict-casts-phpstan-rule)

Ensure you're using [strict casts](https://github.com/ntzm/strict-casts) wherever possible

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

[](#installation)

```
$ composer require ntzm/strict-casts-phpstan

```

In your PHPStan config, add:

```
includes:
    - vendor/ntzm/strict-casts-phpstan/rules.neon

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity60

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

Total

2

Last Release

2520d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1fdd8cc588f54db13757aeca049b5007c6d368ff16a75dcecff337d1c9399970?d=identicon)[natzim](/maintainers/natzim)

---

Top Contributors

[![ntzm](https://avatars.githubusercontent.com/u/3888578?v=4)](https://github.com/ntzm "ntzm (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ntzm-strict-casts-phpstan/health.svg)

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

###  Alternatives

[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[larastan/larastan

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

6.4k43.5M5.2k](/packages/larastan-larastan)[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M2.0k](/packages/behat-behat)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

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

Doctrine extensions for PHPStan

66466.6M1.1k](/packages/phpstan-phpstan-doctrine)[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.

33120.0M375](/packages/spaze-phpstan-disallowed-calls)

PHPackages © 2026

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