PHPackages                             orklah/psalm-elvis-begone - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. orklah/psalm-elvis-begone

ActivePsalm-plugin[Utility &amp; Helpers](/categories/utility)

orklah/psalm-elvis-begone
=========================

Replace Elvis operator (?:) by null coalesce operator (??) when applicable

v1.0.0(4y ago)710.1k[1 issues](https://github.com/orklah/psalm-elvis-begone/issues)MITPHPPHP ^7.3|^8.0

Since Oct 13Pushed 4y ago1 watchersCompare

[ Source](https://github.com/orklah/psalm-elvis-begone)[ Packagist](https://packagist.org/packages/orklah/psalm-elvis-begone)[ RSS](/packages/orklah-psalm-elvis-begone/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

psalm-elvis-begone
==================

[](#psalm-elvis-begone)

A [Psalm](https://github.com/vimeo/psalm) plugin to replace Elvis operator (?:) by null coalesce operator (??) when applicable

Installation:

```
$ composer require --dev orklah/psalm-elvis-begone
$ vendor/bin/psalm-plugin enable orklah/psalm-elvis-begone
```

Usage:

Run Psalter command:

```
$ vendor/bin/psalm --alter --plugin=vendor/orklah/psalm-elvis-begone/src/Plugin.php
```

Explanation:

The short ternary operator (or Elvis operator ?: ) is used to evaluate return its condition if it's true or the second operand if it's not.

When the type is known and the only falsy value is null, we can actually replace it with the null coalesce operator (??) for strictness and clarity.

It will prevent future values to be evaluated to false when it was not the intention

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Unknown

Total

1

Last Release

1673d ago

### Community

Maintainers

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

---

Top Contributors

[![orklah](https://avatars.githubusercontent.com/u/9605520?v=4)](https://github.com/orklah "orklah (2 commits)")

### Embed Badge

![Health badge](/badges/orklah-psalm-elvis-begone/health.svg)

```
[![Health](https://phpackages.com/badges/orklah-psalm-elvis-begone/health.svg)](https://phpackages.com/packages/orklah-psalm-elvis-begone)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[php-standard-library/psalm-plugin

Psalm plugin for the PHP Standard Library

252.0M47](/packages/php-standard-library-psalm-plugin)[humanmade/psalm-plugin-wordpress

WordPress stubs and plugin for Psalm static analysis.

81459.7k23](/packages/humanmade-psalm-plugin-wordpress)[codeigniter4/devkit

Development toolkit for CodeIgniter libraries and projects

68187.1k82](/packages/codeigniter4-devkit)[ramsey/devtools

A Composer plugin to aid PHP library and application development.

7134.7k26](/packages/ramsey-devtools)[orklah/psalm-strict-types

Adds strict\_types declaration when the file is provably safe

16104.0k](/packages/orklah-psalm-strict-types)

PHPackages © 2026

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