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)1195.4k↓28.1%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 1mo 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 68% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity35

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

3770d 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

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

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