PHPackages                             tioncico/logic-assert - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. tioncico/logic-assert

ActiveL[Testing &amp; Quality](/categories/testing)

tioncico/logic-assert
=====================

逻辑断言

1.0.1(6y ago)2541Apache-2.0PHP

Since Sep 12Pushed 6y ago1 watchersCompare

[ Source](https://github.com/tioncico/LogicAssert)[ Packagist](https://packagist.org/packages/tioncico/logic-assert)[ RSS](/packages/tioncico-logic-assert/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

LogicAssert
===========

[](#logicassert)

逻辑断言组件,用于项目中,直接断言,抛出异常,简化代码

### 示例

[](#示例)

```
$userId = null;
//常规判断写法
if ($userId===null){
    echo "会员id不存在!";
}

try{
    //断言写法
    \LogicAssert\Assert::assertEquals($userId, null,'会员id不存在!');
}catch (\Throwable $throwable){
    echo $throwable->getMessage();
}
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

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 ~0 days

Total

2

Last Release

2437d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8d05a3f5bdd7b1b6b01e36330fa52eeb54d1bef5eb0a419e0b53631e9c30b078?d=identicon)[tioncico](/maintainers/tioncico)

---

Top Contributors

[![tioncico](https://avatars.githubusercontent.com/u/31308307?v=4)](https://github.com/tioncico "tioncico (9 commits)")

### Embed Badge

![Health badge](/badges/tioncico-logic-assert/health.svg)

```
[![Health](https://phpackages.com/badges/tioncico-logic-assert/health.svg)](https://phpackages.com/packages/tioncico-logic-assert)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

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