Skip to content
  • Sébastien GELDREICH's avatar
    Add Option, Either, and Validation safe types implementation · df55012c
    Sébastien GELDREICH authored
    This commit introduces a PHP library providing functional-style "safe types" like Option and Either for error-handling and validation. Key features include utility methods for safely unwrapping contained values and constructing types based on value states like Some, None, Left, or Right.
    
    Changes:
    - Added `Unwrap` interface for safely extracting values.
    - Added `Option` interface and `Some` and `None` implementations.
    - Added `Either` feature with `Left`, `Right`, and shared `LeftOrRight` class.
    - Added `Validated` class for value validation using custom validators.
    - Updated `README.md` with type documentation and examples.
    - Introduced `composer.json` and `composer.lock` for dependency management.
    - Added `.gitignore` to exclude vendor directories from source control.
    df55012c
This project is licensed under the MIT License. Learn more