PHPackages                             eihmels/integer-value-objects - 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. eihmels/integer-value-objects

ActiveLibary[Utility &amp; Helpers](/categories/utility)

eihmels/integer-value-objects
=============================

some Value Objects

1.0.2(5y ago)02MITPHPPHP ^7.4

Since Nov 17Pushed 5y ago1 watchersCompare

[ Source](https://github.com/eihmels/integer-value-objects)[ Packagist](https://packagist.org/packages/eihmels/integer-value-objects)[ RSS](/packages/eihmels-integer-value-objects/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (3)Dependencies (3)Versions (6)Used By (0)

php-value-objects
=================

[](#php-value-objects)

inspired by

In this Package there are a bunch of Integer Value Objects with some validations. you can inherit this base Values to adapt it to your wishes.

Install
-------

[](#install)

```
    composer require eihmels/integer-value-objects

```

ValueObjects
------------

[](#valueobjects)

all Value Objects Inherite from NumberInterface. In this Interface are some basic functions defined. take a look into src/NumberInterface.php.

You are not allowed to change the values after initializing.

### Basic Integer

[](#basic-integer)

src/Integer.php

example:

```
    $one = Integer:create(1);
```

### Natural Number

[](#natural-number)

src/NaturalNumber.php

A natural Number is a Positive Integer.

example:

```
    $one = NaturalNumber:create(1);
```

0 isn't a valid NaturalNumber. if you define 0 to natural numbers use NaturalNumbersWithNull.

example:

```
    $null = NaturalNumberWithNull:create(0);
```

Codequality Tools
-----------------

[](#codequality-tools)

run phpUnit

```
    php ./vendor/bin/phpunit.phar --configuration ./phpunit.xml
    php ./vendor/bin/phpunit.phar --coverage-html ./coverage-report

```

run phpstan

```
   php ./vendor/bin/phpcs.phar --standard=./ruleset.xml  ./src/*/
   php ./vendor/bin/phpcs.phar --standard=./ruleset.xml  ./tests/*

```

run phpstan

```
   php ./vendor/bin/phpstan.phar analyse -l max  ./src/

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Every ~2 days

Total

4

Last Release

2002d ago

Major Versions

0.0.9 → 1.0.12020-11-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/84e2df205cebaf1fb6e32a27a452961aefff8ae6a1c52f7cce2912a22067888d?d=identicon)[eihmels](/maintainers/eihmels)

---

Top Contributors

[![eihmels](https://avatars.githubusercontent.com/u/39192593?v=4)](https://github.com/eihmels "eihmels (12 commits)")

---

Tags

php

### Embed Badge

![Health badge](/badges/eihmels-integer-value-objects/health.svg)

```
[![Health](https://phpackages.com/badges/eihmels-integer-value-objects/health.svg)](https://phpackages.com/packages/eihmels-integer-value-objects)
```

###  Alternatives

[morilog/jalali

This Package helps developers to easily work with Jalali (Shamsi or Iranian) dates in PHP applications, based on Jalali (Shamsi) DateTime class.

9201.2M45](/packages/morilog-jalali)[nikolaposa/version

Value Object that represents a SemVer-compliant version number.

1406.4M16](/packages/nikolaposa-version)[prooph/common

Common classes used across prooph packages

852.2M27](/packages/prooph-common)[funeralzone/valueobjects

A PHP 7.1 value objects helper library.

66643.3k22](/packages/funeralzone-valueobjects)[worksome/coding-style

Worksomes coding style

49771.7k57](/packages/worksome-coding-style)[laminas/laminas-coding-standard

Laminas Coding Standard

331.7M534](/packages/laminas-laminas-coding-standard)

PHPackages © 2026

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