PHPackages                             komakino/modulus11 - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. komakino/modulus11

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

komakino/modulus11
==================

v1.0.0(10y ago)1199.7k↓63%1[1 issues](https://github.com/komakino/modulus11/issues)[1 PRs](https://github.com/komakino/modulus11/pulls)1PHP

Since Jan 21Pushed 7y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (1)

Modulus11
=========

[](#modulus11)

Modulus11 algorithm implementation for PHP. The Modulus11 algorithm is used in some bank account numbers and national identity numbers.

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

[](#installation)

To add this package as a dependency to your project, simply add a dependency on `komakino/modulus11` to your project's `composer.json` file.

```
    {
        "require": {
            "komakino/modulus11": "*"
        }
    }
```

### Usage

[](#usage)

```
use Komakino\Modulus11\Modulus11;
```

#### Factors

[](#factors)

The standard factors for Modulus11 calculations are \[2,3,4,5,6,7\], looped. In some cases other factors are used. If your implementation requires custom factors, simply supply them as a second argument to any method.

#### Static methods

[](#static-methods)

*static* bool **validate**(*string*|*int* $number, *array* $factors = null)

Validates a number.

```
Modulus11::validate('11223344'); // returns false
Modulus11::validate('12345674'); // returns true
```

*static* int **calculate**(*string*|*int* $partial\_number, *array* $factors = null)

Calculates the check digit of a number.

```
Modulus11::calculate('1122334'); // returns 6
Modulus11::calculate('1234567'); // returns 4
```

*static* string **appendCheckDigit**(*string*|*int* $partial\_number, *array* $factors = null)

Calculates the check digit and returns number with check digit appended.

```
Modulus11::appendCheckDigit('1122334'); // returns 11223346
Modulus11::appendCheckDigit('1234567'); // returns 12345674
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community10

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

Unknown

Total

1

Last Release

3816d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d2e89d042293e6d2589ecec3813563553b0a6f1ce86a777a421dd759bcb95a1?d=identicon)[komakino](/maintainers/komakino)

---

Top Contributors

[![komakino](https://avatars.githubusercontent.com/u/863727?v=4)](https://github.com/komakino "komakino (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/komakino-modulus11/health.svg)

```
[![Health](https://phpackages.com/badges/komakino-modulus11/health.svg)](https://phpackages.com/packages/komakino-modulus11)
```

###  Alternatives

[marcosh/php-validation-dsl

A DSL for validating data in a functional fashion

483.9k](/packages/marcosh-php-validation-dsl)

PHPackages © 2026

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