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

20

—

LowBetter than 14% of packages

Maintenance56

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

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

[aaronfrancis/flaky

A Laravel package to elegantly handle flaky operations.

41524.8k](/packages/aaronfrancis-flaky)[cedaro/woocommerce-coupon-links

A WordPress plugin to automatically apply a WooCommerce coupon code to the cart with a URL.

13770.4k](/packages/cedaro-woocommerce-coupon-links)[execut/yii2-widget-bootstraptreeview

Bootstrap Tree View widget wrapper for yii2

46170.2k](/packages/execut-yii2-widget-bootstraptreeview)[mouf/classname-mapper

Provides a way to find in which PHP files a class will be looked upon.

112.3M5](/packages/mouf-classname-mapper)[tarfin-labs/zbar-php

zbar-php is a php package that provides an interface to the zbar bar-code reading library.

2593.2k](/packages/tarfin-labs-zbar-php)[fkr/simplepie-bundle

Integrates SimplePie into Symfony

11137.5k](/packages/fkr-simplepie-bundle)

PHPackages © 2026

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