PHPackages                             ganbarodigital/php-mv-defensive - 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. ganbarodigital/php-mv-defensive

ActiveLibrary

ganbarodigital/php-mv-defensive
===============================

v1.2016082401(9y ago)0973BSD-3-ClausePHPPHP &gt;= 5.5

Since May 21Pushed 9y ago1 watchersCompare

[ Source](https://github.com/ganbarodigital/php-mv-defensive)[ Packagist](https://packagist.org/packages/ganbarodigital/php-mv-defensive)[ RSS](/packages/ganbarodigital-php-mv-defensive/feed)WikiDiscussions develop Synced 2mo ago

READMEChangelogDependencies (7)Versions (9)Used By (3)

PHP Defensive
=============

[](#php-defensive)

[![GitHub license](https://camo.githubusercontent.com/fa7d5fcf2c84b580327af52da95dd751703af65f079dc3c5a0081beac0789718/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4e65772532304253442d626c75652e737667)](https://raw.githubusercontent.com/ganbarodigital/php-defensive/develop/LICENSE.md)[![@ganbarodigital on Twitter](https://camo.githubusercontent.com/cfe3f6e7ae9c18f66fa57bed843790e668bd3ac88417017dfe9f45d8f0296cb9/687474703a2f2f696d672e736869656c64732e696f2f62616467652f747769747465722d25343067616e6261726f6469676974616c2d626c75652e7376673f7374796c653d666c6174)](https://twitter.com/ganbarodigital)[![Total Downloads](https://camo.githubusercontent.com/d921f702bfed79aa5b903fe47d851df02e23f8f089cad0a2ccb388a831ea5fbc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67616e6261726f6469676974616c2f7068702d646566656e736976652e7376673f7374796c653d666c6174)](https://packagist.org/packages/ganbarodigital/php-defensive)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/8d9a3bc8c361fb8f164b6f8609c2ec98bfb64d771fff4e0b8064f731a18c8523/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f67616e6261726f6469676974616c2f7068702d646566656e736976652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ganbarodigital/php-defensive/?branch=master)[![Build Status](https://camo.githubusercontent.com/8de4c7ce93caef9c591775ac77d565d03cdecd73023cd2a4f5710f61432feb4d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f67616e6261726f6469676974616c2f7068702d646566656e736976652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ganbarodigital/php-defensive/build-status/master)[![Coverage Status](https://camo.githubusercontent.com/afdf95f31ed1d9dfe2cb275c5fa1127273a311ec398b19b9d621e58e63d5b8c6/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f67616e6261726f6469676974616c2f7068702d646566656e736976652f62616467652e737667)](https://coveralls.io/r/ganbarodigital/php-defensive)[![Dependency Status](https://camo.githubusercontent.com/80c1ca285b72d750f7e4fafd2768647e7b8785de3bc0ea6592cf43d3556269c4/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f67616e6261726f6469676974616c3a7068702d646566656e736976652f6465762d6d61737465722f62616467652e737667)](https://www.versioneye.com/php/ganbarodigital:php-defensive/dev-master)[![Reference Status](https://camo.githubusercontent.com/2d207a7f3a16dcde7b99d5f3b20ab6dc6a2c9b2ca7df774c8409ac517476f772/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f67616e6261726f6469676974616c3a7068702d646566656e736976652f7265666572656e63655f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/php/ganbarodigital:php-defensive/references)

Introduction
------------

[](#introduction)

The PHP Defensive library provides an easy-to-use collection of defensive-programming helpers that you can quickly drop into your own project to save you time and effort.

It is (in part) the successor to Phix's ContractLib.

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

[](#installation)

Run this command to add this library to your `composer.json` file:

```
composer require ganbarodigital/php-mv-defensive

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

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

Total

7

Last Release

3548d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2dc3934d5c3ce55e18dca95d52b564fb2a34986770af3c532dba6c248ef58f3a?d=identicon)[stuartherbert](/maintainers/stuartherbert)

---

Top Contributors

[![stuartherbert](https://avatars.githubusercontent.com/u/7926?v=4)](https://github.com/stuartherbert "stuartherbert (139 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ganbarodigital-php-mv-defensive/health.svg)

```
[![Health](https://phpackages.com/badges/ganbarodigital-php-mv-defensive/health.svg)](https://phpackages.com/packages/ganbarodigital-php-mv-defensive)
```

PHPackages © 2026

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