yii-extension / helpers
可重用帮助工具集合。
该软件包的官方仓库似乎已不存在,因此软件包已被冻结。
dev-master / 1.0.x-dev
2022-01-18 14:25 UTC
Requires
- php: ^7.4|^8.0
- yiisoft/arrays: ^2.0
Requires (Dev)
- phpunit/phpunit: ^9.5
- roave/infection-static-analysis-plugin: ^1.10
- vimeo/psalm: ^4.8
This package is auto-updated.
Last update: 2024-01-10 06:37:28 UTC
README
可重用帮助工具集合。
安装
composer require yii-extension/helpers
使用
获取所有时区
<?php declare(strict_types=1); use Yii\Extension\Helpers\TimeZone; use Yiisoft\Arrays\ArrayHelper; // Get all timezone order by name $timeZones = ArrayHelper::map(TimeZone::getAll(), 'timezone', 'name');
生成密码
<?php declare(strict_types=1); use Yii\Extension\Helpers\Password; // Generate string password length: 8 $password = Password::generate(8);
单元测试
该软件包使用 PHPUnit 进行测试。要运行测试
./vendor/bin/phpunit
变异测试
软件包测试使用 Infection 变异框架进行检验。要运行它
./vendor/bin/infection
静态分析
代码使用 Psalm 进行静态分析。要运行静态分析
./vendor/bin/psalm
许可
yii-extension/helpers
是自由软件。它根据 BSD 许可协议发布。有关更多信息,请参阅 LICENSE
。
由 Yii Extension 维护。