badjacky / basic-type
Complex data type
1.0.1
2024-07-03 03:12 UTC
Requires
- php: ^8.2
- illuminate/support: >10.0
Requires (Dev)
- orchestra/testbench: >=9.1.2
- pestphp/pest: ^2.34.8
This package is auto-updated.
Last update: 2025-03-08 21:43:11 UTC
README
Basic Type Assert is a PHP package designed to simplify and enhance type assertions in your applications.
Installation
Install the package via Composer:
composer require badjacky/basic-type
Usage
Here is a basic usage example:
use function BadJacky\BasicType\type; // Example usage type(1)->asInt(); // 1 type(['a'])->asArray(); // ['a'] type('string')->asString(); // 'string' type(1.1)->asFloat(); // 1.1 type(true)->asBool(); // true type(null)->asNull(); // null type(new stdClass())->asObject(); // stdClass
Testing
To run tests, use the following command:
composer test
Changelog
See CHANGELOG for recent updates.
Contributing
See CONTRIBUTING for contribution guidelines.
Security
If you find any security-related issues, please email zhangqi.chen.cn@gmail.com instead of using the issue tracker.
Credits
- BadJacky
- All contributors
License
This project is licensed under the MIT License. See the LICENSE file for details.
Acknowledgments
This package was generated using the Laravel Package Boilerplate.