wyster / yamsa
Yandex Money SMS 分析器
v1.0.1
2019-12-14 15:46 UTC
Requires
- php: >=7.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.15
- infection/infection: ^0.15
- php-coveralls/php-coveralls: ^2.1
- phpbench/phpbench: ^0.16
- phpro/grumphp: ^0.17
- phpunit/phpunit: ^8
- sensiolabs/security-checker: ^6.0
- vimeo/psalm: ^3.4
- wearejust/grumphp-extra-tasks: ^2.2
This package is auto-updated.
Last update: 2024-09-15 02:22:14 UTC
README
需要 php 版本 >= 7.2
通过 Composer 安装
$ composer require wyster/yamsa
使用示例
<?php
use Yamsa\Factory\Analyzer;
require __DIR__ . '/vendor/autoload.php';
$analyzer = Analyzer::create();
$message = <<<TEXT
Пароль: 7740
Спишется 234,18р.
Перевод на счет 41001247739481
TEXT;
print_r($analyzer->run($message)); //=> Yamsa\Entity Object
结果
Yamsa\Entity Object
(
[sum:Yamsa\Entity:private] => 234.18 // string
[password:Yamsa\Entity:private] => 7740 // integer
[account:Yamsa\Entity:private] => 41001247739481 // integer
)
运行测试
$ composer test
覆盖率(需要 xdebug)
$ composer coverage