定制 owndeveloper/number-massking 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

owndeveloper/number-massking

最新稳定版本:1.0.0

Composer 安装命令:

composer require owndeveloper/number-massking

包简介

this is simple number masking

README 文档

README

Latest Stable Version License

Description

Number-Mask is a lightweight PHP library that provides functionality for masking or obfuscating numbers. It allows you to format numbers in a desired pattern while retaining the original digits.

Installation

You can install this package via Composer:

composer require owndeveloper/number-massking

## Usage

### Initializing the Package
To use the package, you need to first initialize it and provide the number and format:

```php
use OwnDeveloper\NumberMask;

require "./vendor/autoload.php";
$numberMask = new NumberMask();

Example Usage

Here's an example of how you can use the package to calculate the GST amount:

try {
    $number = $numberMask->masking('9876543210','987-6543-210');
    echo "Masked Number: ". $number;
} catch (\Exception $e) {
    echo $e->getMessage();
}

Exception Handling

The package handles exceptions for invalid values. If the value passed to the masking() method is character, an exception will be thrown. You can catch the exception and handle it accordingly.

Testing

The package comes with a set of unit tests to ensure its stability and functionality. You can run the tests using the following command:

vendor/bin/phpunit

Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please create an issue in the [issue tracker]. If you'd like to contribute code, please follow these guidelines:

  1. Fork the repository.
  2. Create a new branch for your feature/bug fix.
  3. Commit your changes and push them to your branch.
  4. Submit a pull request.

Please ensure that your code adheres to the existing coding style and is well-documented.

License

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-30