PHPackages                             shish/phpstan-matchy-string - 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. shish/phpstan-matchy-string

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

shish/phpstan-matchy-string
===========================

PHPStan rule for strings that match certain conditions

v0.0.0(1y ago)18.5k↑222.9%MITPHPCI passing

Since Jun 4Pushed 2mo agoCompare

[ Source](https://github.com/shish/phpstan-matchy-string)[ Packagist](https://packagist.org/packages/shish/phpstan-matchy-string)[ RSS](/packages/shish-phpstan-matchy-string/feed)WikiDiscussions main Synced yesterday

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

PHPStan Matchy Strings
======================

[](#phpstan-matchy-strings)

- patterns defined in `phpstan.neon`, eg `email-string: '^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$'`
- function defined like:

```
/**
 * @param email-string $email
 */
function sendEmail(string $email): void {
    ...
}
```

- phpstan will then allow `sendEmail("bob@example.com")` but not `sendEmail("bob@example")`

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance68

Regular maintenance activity

Popularity27

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

394d ago

### Community

Maintainers

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

---

Top Contributors

[![shish](https://avatars.githubusercontent.com/u/40659?v=4)](https://github.com/shish "shish (6 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/shish-phpstan-matchy-string/health.svg)

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

###  Alternatives

[dms/phpunit-arraysubset-asserts

This package provides ArraySubset and related asserts once deprecated in PHPUnit 8

14429.2M360](/packages/dms-phpunit-arraysubset-asserts)

PHPackages © 2026

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