PHPackages                             leijiongbin/tools - 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. leijiongbin/tools

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

leijiongbin/tools
=================

常用的工具类

1.0.0(7y ago)09MITPHPPHP &gt;=5.3.0

Since Apr 12Pushed 7y ago1 watchersCompare

[ Source](https://github.com/leijiongbin/tools-composer)[ Packagist](https://packagist.org/packages/leijiongbin/tools)[ RSS](/packages/leijiongbin-tools/feed)WikiDiscussions master Synced 3d ago

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

操作
==

[](#操作)

```
composer require leijiongbin/tools

```

功能类
===

[](#功能类)

- 1.0.0版本：
    - class Error 错误信息管理

    ```
    use tools\Error;
    function get_error_codes()
    function get_error_code()
    function get_error_messages($code)
    function get_error_message($code)
    function get_error_data($code)
    function add($code, $message, $data)
    function add_data($data, $code)
    function remove($code)

    ```

    - class JsonSend 返回json数据

    ```
    use tools\JsonSend;
    static function returnMsg($code=200, $msg='', $data=[], $header=[])
    static function returnSuccess($data=[], $header=[])
    static function returnError($message='error', $data=[], $header=[])

    ```

    - class Validate 验证信息是否正确

    ```
    use tools\Validate;
    function check()
    function required($ukey, $val, $msg='字段未填入')
    function same($ukey, $first, $second, $msg='两次输入不一致')

    ```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

2637d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/60061e83cffd73ac65c77db355c7109e3ab9c1c6449b0479270386c344ee1005?d=identicon)[leijiongbin](/maintainers/leijiongbin)

---

Top Contributors

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

---

Tags

tools

### Embed Badge

![Health badge](/badges/leijiongbin-tools/health.svg)

```
[![Health](https://phpackages.com/badges/leijiongbin-tools/health.svg)](https://phpackages.com/packages/leijiongbin-tools)
```

###  Alternatives

[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

3014.5M22](/packages/vaimo-composer-patches)[dereuromark/cakephp-tools

A CakePHP plugin containing lots of useful and reusable tools

333972.2k49](/packages/dereuromark-cakephp-tools)[longman/ip-tools

PHP IP Tools for manipulation with IPv4 and IPv6

147253.5k7](/packages/longman-ip-tools)[codeigniter4/devkit

Development toolkit for CodeIgniter libraries and projects

68195.7k114](/packages/codeigniter4-devkit)[ramsey/devtools

A Composer plugin to aid PHP library and application development.

7135.7k29](/packages/ramsey-devtools)[glpi-project/tools

Various tools for GLPI and its plugins

13743.2k4](/packages/glpi-project-tools)

PHPackages © 2026

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