PHPackages                             moderntribe/static-analysis - 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. moderntribe/static-analysis

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

moderntribe/static-analysis
===========================

Modern Tribe static analysis using PHPStan

06

Since Apr 7Pushed 4y agoCompare

[ Source](https://github.com/moderntribe/static-analysis)[ Packagist](https://packagist.org/packages/moderntribe/static-analysis)[ RSS](/packages/moderntribe-static-analysis/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Modern Tribe Static Analysis Using PHPStan
==========================================

[](#modern-tribe-static-analysis-using-phpstan)

Install
-------

[](#install)

Composer v2:

```
composer require --dev moderntribe/static-analysis
```

Composer v1:

Add to the `repositories` object:

```
    {
      "type": "vcs",
      "url": "git@github.com:moderntribe/static-analysis.git"
    }
```

And `require-dev`:

```
  "moderntribe/static-analysis": "^0.0"
```

Usage
-----

[](#usage)

To run static analysis on your project, create `phpstan.neon.dist` file in your project root with the following content:

```
parameters:
	level: 2
	paths:
		- wp-content/themes/core/
		- wp-content/plugins/core/
		- wp-content/mu-plugins/
	excludePaths:
		- vendor
	bootstrapFiles:
		- vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
		- vendor/php-stubs/acf-pro-stubs/acf-pro-stubs.php
	tmpDir: .phpstan-cache/
	ignoreErrors:
		- '#^Function yoast_get_primary_term_id not found.$#'

	checkAlwaysTrueStrictComparison: true

	# Unfortunately, DocBlocks can't be relied upon in WordPress.
	treatPhpDocTypesAsCertain: false
```

To run phpstan on your project, run `phpstan analyse --configuration=phpstan.neon.dist` from your project root.

Update your project's .gitignore
--------------------------------

[](#update-your-projects-gitignore)

```
/.phpstan-cache
/phpstan.neon
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

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.

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/7f24821ddc28f26fff6b85940d5c65cf179e7487695383944b80f2e5257db6a0?d=identicon)[nickpelton](/maintainers/nickpelton)

![](https://www.gravatar.com/avatar/3a4b408497e5ffbd28004ed04bf85d51b8abdddadbe3e5ba10e3ce450186006b?d=identicon)[ChrisMKindred](/maintainers/ChrisMKindred)

### Embed Badge

![Health badge](/badges/moderntribe-static-analysis/health.svg)

```
[![Health](https://phpackages.com/badges/moderntribe-static-analysis/health.svg)](https://phpackages.com/packages/moderntribe-static-analysis)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

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

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

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