承接 zawiszaty/sorted-linked-list 相关项目开发

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

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

zawiszaty/sorted-linked-list

Composer 安装命令:

composer require zawiszaty/sorted-linked-list

包简介

Sorted linked list library with strict type safety for int or string values.

README 文档

README

Strictly typed, always-sorted singly linked list for PHP.

Overview

This library provides a SortedLinkedList data structure that:

  • keeps values in ascending order after every write operation,
  • supports one type per instance: int or string,
  • allows duplicates with stable order for equal values,
  • exposes a small and predictable API.

Project specification:

  • requirements.md
  • HLD.md

Requirements

  • PHP ^8.2
  • Composer

Installation

composer install

Quick Start

<?php

declare(strict_types=1);

use Zawiszaty\SortedLinkedList\SortedLinkedList;

$list = SortedLinkedList::forInt();
$list->addAll([3, 1, 2, 2]);

echo $list . PHP_EOL;         // [1, 2, 2, 3]
echo $list->first() . PHP_EOL; // 1
echo $list->last() . PHP_EOL;  // 3

String mode:

$list = SortedLinkedList::forString();
$list->addAll(['pear', 'apple', 'banana']);
// ['apple', 'banana', 'pear']

Custom comparator:

$list = SortedLinkedList::forInt(
    static fn (int $a, int $b): int => $b <=> $a
);

$list->addAll([1, 3, 2]); // [3, 2, 1]

Public API

  • SortedLinkedList::forInt(?callable $comparator = null): self
  • SortedLinkedList::forString(?callable $comparator = null): self
  • add(int|string $value): void
  • addAll(iterable<int|string> $values): void
  • remove(int|string $value): bool
  • removeAll(int|string $value): int
  • removeAt(int $index): void
  • contains(int|string $value): bool
  • get(int $index): int|string
  • first(): int|string
  • last(): int|string
  • clear(): void
  • toArray(): array
  • count(): int
  • isEmpty(): bool
  • getIterator(): Traversable
  • __toString(): string

Exceptions

  • TypeMismatchException
  • IndexOutOfBoundsException
  • EmptyListException

Example Script

Run the example:

php examples/demo.php

Performance Benchmarking

Run a quick terminal benchmark:

php benchmarks/performance.php

Generate machine-readable results:

php benchmarks/performance.php --json > benchmarks/current.json

Render a human-readable report from JSON:

php benchmarks/render-report.php benchmarks/current.json

Check performance regression against the baseline (30% threshold by default):

php benchmarks/check-regression.php benchmarks/current.json benchmarks/baseline.json

Use a custom regression threshold (example 20%):

php benchmarks/check-regression.php benchmarks/current.json benchmarks/baseline.json 0.20

Quality Gates

This repository is configured with:

  • PHPUnit
  • PHPStan (max level)
  • Psalm
  • PHP CS Fixer
  • Infection (mutation testing)

Current mutation gate is configured in infection.json5:

  • minMsi: 80.0
  • minCoveredMsi: 80.0

Development Commands

composer test
composer stan
composer psalm
composer cs:check
XDEBUG_MODE=coverage composer infection

CI Pipeline

GitHub Actions workflow (.github/workflows/ci.yml) runs in this order:

  1. build
  2. static analysis in parallel: phpstan, cs-check, psalm
  3. in parallel after static analysis: tests (PHP matrix) and mutation-testing

Project Layout

  • src/ - library source code
  • tests/ - PHPUnit tests
  • examples/ - runnable usage demo
  • requirements.md - requirements specification
  • HLD.md - high-level design

zawiszaty/sorted-linked-list 适用场景与选型建议

zawiszaty/sorted-linked-list 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 1, 最近一次更新时间为 2026 年 02 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 zawiszaty/sorted-linked-list 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 zawiszaty/sorted-linked-list 我们能提供哪些服务?
定制开发 / 二次开发

基于 zawiszaty/sorted-linked-list 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2026-02-19