yii-extension / helpers
Collection of reusable helpers.
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 1 265
Dependents: 3
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 5
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
Collection of reusable helpers.
Installation
composer require yii-extension/helpers
Usage:
Get All TimeZones:
<?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');
Generate Password:
<?php declare(strict_types=1); use Yii\Extension\Helpers\Password; // Generate string password length: 8 $password = Password::generate(8);
Unit testing
The package is tested with PHPUnit. To run tests:
./vendor/bin/phpunit
Mutation testing
The package tests are checked with Infection mutation framework. To run it:
./vendor/bin/infection
Static analysis
The code is statically analyzed with Psalm. To run static analysis:
./vendor/bin/psalm
License
The yii-extension/helpers
is free software. It is released under the terms of the BSD License.
Please see LICENSE
for more information.
Maintained by Yii Extension.