PHPackages                             7csn/utils-validation-type - 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. 7csn/utils-validation-type

ActiveLibrary

7csn/utils-validation-type
==========================

数据类型验证

v1.0.0(5y ago)0601MITPHPPHP &gt;=7.4.0

Since May 10Pushed 5y ago1 watchersCompare

[ Source](https://github.com/7csn/chaser-utils-validation-type)[ Packagist](https://packagist.org/packages/7csn/utils-validation-type)[ RSS](/packages/7csn-utils-validation-type/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (2)Used By (1)

utils-validation-type
---------------------

[](#utils-validation-type)

数据类型验证

### 运行环境

[](#运行环境)

- PHP &gt;= 7.4

### 安装

[](#安装)

```
composer require 7csn/utils-validation-type

```

### 应用说明

[](#应用说明)

- 方法 ```
    use chaser\utils\validation\Type;
    use InvalidArgumentException;

    // 判断数值类型是否无效
    Type::invalid($value, int $type, array &$declarations = []): bool;

    // 验证数值类型（未通过抛出异常）
    Type::validate(string $name, $value, int $type): void;

    // 类型异常
    Type::exception(string $name, string $declaration): InvalidArgumentException;
    ```
- 类型（$type），可用“|”结合使用
    - Type::NULL
    - Type::INT
    - Type::FLOAT
    - Type::STRING
    - Type::ARRAY
    - Type::OBJECT
    - Type::CALLABLE
    - Type::RESOURCE

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

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

Unknown

Total

1

Last Release

1833d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/26515676?v=4)[7csn](/maintainers/7csn)[@7csn](https://github.com/7csn)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/7csn-utils-validation-type/health.svg)

```
[![Health](https://phpackages.com/badges/7csn-utils-validation-type/health.svg)](https://phpackages.com/packages/7csn-utils-validation-type)
```

PHPackages © 2026

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