PHPackages                             tessera-php/tessera-type-int - 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. tessera-php/tessera-type-int

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

tessera-php/tessera-type-int
============================

Tessera type: Integer

06PHP

Since Feb 23Pushed 2mo agoCompare

[ Source](https://github.com/tessera-php/tessera-type-int)[ Packagist](https://packagist.org/packages/tessera-php/tessera-type-int)[ RSS](/packages/tessera-php-tessera-type-int/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Tessera Type: Int
=================

[](#tessera-type-int)

Целочисленный тип для Tessera.

Установка
---------

[](#установка)

```
composer require tessera-php/tessera-type-int
```

Использование
-------------

[](#использование)

```
use Tessera\Type\Int\IntType;
use Tessera\Type\Int\IntData;

$type = new IntType();

// Валидация
$type->validate(42);        // true
$type->validate('42');      // true
$type->validate(42.0);      // true (float без дробной части)
$type->validate(3.14);      // false
$type->validate('abc');     // false

// Нормализация
$data = $type->normalize('42');
echo $data->value;          // 42 (int)

// DTO
$data = new IntData(123);
echo $data->value;          // 123
```

Принимаемые форматы
-------------------

[](#принимаемые-форматы)

- `int` — нативное целое число
- `bool` — булево значение (приводится к 0 или 1)
- `string` — числовая строка ('42', '-10', '+5')
- `float` — только без дробной части (42.0, -10.0)

Контракт
--------

[](#контракт)

`provide: tessera-contract-type/int`

Лицензия
--------

[](#лицензия)

MIT

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance60

Regular maintenance activity

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/tessera-php-tessera-type-int/health.svg)

```
[![Health](https://phpackages.com/badges/tessera-php-tessera-type-int/health.svg)](https://phpackages.com/packages/tessera-php-tessera-type-int)
```

###  Alternatives

[mwhite/random-uagent

A library for generating random User Agents

2453.4k2](/packages/mwhite-random-uagent)

PHPackages © 2026

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