Search by

tumugin / stannum

tumugin

Stannum makes PHP's scalar types more expressive!

Package info

github.com/tumugin/stannum

pkg:composer/tumugin/stannum

Statistics

Installs: 8 927

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 7

0.6.0 2022-04-09 17:22 UTC

This package is auto-updated.

Last update: 2026-10-29 20:43:49 UTC


README

phpcs(PSR12) CI Coverage Status

Stannum makes PHP's scalar types more expressive!

This project is under development. It is not recommended using in production.

Supported environments

Stannum supports and tested on PHP 7.4 or above.

Currently, Stannum is tested on the CI environment below.

  • PHP 7.4/8.0/8.1 on latest Windows
  • PHP 7.4/8.0/8.1 on latest Ubuntu(Linux)
  • PHP 7.4/8.0/8.1 on latest macOS

How to use

// Will return [1, 3, 5]
SnIntegerList::byIntArray([1, 2, 3, 4, 5, 6])
    ->filter(fn(SnInteger $val) => $val->isOdd())
    ->toIntArray();