result:受Rust启发PHP结果对象

时间:2021-05-17 23:34:24
【文件属性】:
文件名称:result:受Rust启发PHP结果对象
文件大小:28KB
文件格式:ZIP
更新时间:2021-05-17 23:34:24
rust php datastructures PHP PHP结果对象 PHP实现,具有大致相同的API。 版本信息 3.xx版需要PHP 7.3+。 如果两者都使用,请确保与此版本和库的版本匹配。 安装 composer require prewk/result 概述 use Prewk \ Result ; use Prewk \ Result \{ Ok , Err }; function someApiCall (): Result { // ... if ( $ apiCallSuccesful ) { return new Ok ( $ results ); } else { return new Err ( $ error ); } } function anotherApiCall (): Result { // ... if ( $ apiCa
【文件预览】:
result-master
----.gitignore(18B)
----.github()
--------workflows()
----composer.lock(149KB)
----composer.json(907B)
----phpspec.yml(285B)
----helpers.php(959B)
----src()
--------Result()
--------Result.php(5KB)
----readme.md(3KB)
----spec()
--------Result()
----psalm-baseline.xml(494B)
----psalm.xml(659B)

网友评论