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

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

lunapress/static-analysis
=========================

Psalm, PHPCS and Rector configs for use in WP

06PHPCI passing

Since Oct 7Pushed 7mo agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

LunaPress Static Analysis
=========================

[](#lunapress-static-analysis)

### TODO

[](#todo)

- Psalm plugin for autoregistration of installed `lunapress/*-stubs`
- Rector CLI

### Install

[](#install)

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

### Required

[](#required)

- PHP 8.3+

CLI
---

[](#cli)

### PHP\_CodeSniffer

[](#php_codesniffer)

```
vendor/bin/lunapress-static-analysis phpcs [OPTIONS] -- [...]
```

```
vendor/bin/lunapress-static-analysis phpcbf [OPTIONS] -- [...]
```

`[PHPCS-ARGS]`: Arguments from [PHP\_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Usage)

`[OPTIONS]`:

- `--ruleset` - Path to the custom `ruleset.xml` file relative to the project

If `--ruleset` is not present, it checks the files in order of priority:

1. `.config/.phpcs.xml`
2. `.config/phpcs.xml`
3. `.config/.phpcs.xml.dist`
4. `.config/phpcs.xml.dist`
5. `LunaPressStandard` is automatically applied

#### Example

[](#example)

```
vendor/bin/lunapress-static-analysis phpcs --ruleset=./phpcs/example.xml -- --colors

```

#### Overriding rules

[](#overriding-rules)

`.config/phpcs.xml`

```

```

### Psalm

[](#psalm)

```
vendor/bin/lunapress-static-analysis psalm [OPTIONS] -- [...]
```

`[PSALM-ARGS]`: Arguments from [Psalm](https://psalm.dev/docs/running_psalm/command_line_usage/)

`[OPTIONS]`:

- `--config` - Path to the custom `psalm.xml` file relative to the project

If `--config` is not present, it checks the files in order of priority:

1. `.config/psalm.xml`
2. `.config/psalm.xml.dist`
3. Default config from this package `config/psalm.xml`

#### Example

[](#example-1)

```
vendor/bin/lunapress-static-analysis psalm --config=./phpcs/example.xml -- --help

```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance44

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity13

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f618d5c06c711c1eada5b9569aad7cee6d81e830566775e7734dd87828e8fdc?d=identicon)[0zd0](/maintainers/0zd0)

---

Top Contributors

[![0zd0](https://avatars.githubusercontent.com/u/67220210?v=4)](https://github.com/0zd0 "0zd0 (35 commits)")

### Embed Badge

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

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

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[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)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)

PHPackages © 2026

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