zodimo/base-return

Basic types that communicates the possibility of failure and optional values.

Maintainers

Package info

github.com/zodimo/php-base-return

pkg:composer/zodimo/base-return

Fund package maintenance!

Ko Fi

Statistics

Installs: 156

Dependents: 5

Suggesters: 0

Stars: 1

Open Issues: 0

0.7.1 2025-02-15 14:04 UTC

This package is auto-updated.

Last update: 2026-02-15 16:30:03 UTC


README

2 base return type:

  • Result : represents the possibility of failure.
  • Option : represents an optional value

Result

The factory methods on result are:

  • succeed , and should be read as, succeed with this $value as success.
  • fail, and should be read as, fail with this $value as failure.