承接 michaelpetri/php-generic-list 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

michaelpetri/php-generic-list

最新稳定版本:0.2.1

Composer 安装命令:

composer require michaelpetri/php-generic-list

包简介

Basic generic list with psalm support

README 文档

README

Type Coverage Latest Stable Version License

Installation

composer require michaelpetri/php-generic-list 

Usage

ImmutableList::of(1, 2, 3, 4, 5)
    ->filter(
        static fn(int $i): bool => 0 === $i % 2
    )
    ->map(
        static fn(int $i): int => 2 ** $i
    )
    ->with(
        32
    )
    ->with(
        32
    )
    ->unique()
    ->each(
        static function (int $i): void { sprintf("\d\n", $i) }
    )

// Output:
// 4 
// 16
// 32

Available methods

  • map
  • filter
  • each
  • toArray

统计信息

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

GitHub 信息

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

其他信息

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