Skip to content

It would be nice to be able to inherit the Ok and Err Result classes #16

Closed
@MattyRad

Description

@MattyRad

I currently have a client that returns my own (very similar) Result object:

public function resolve(MyOwnNamespace\Client\Request $request): MyOwnNamespace\Client\Result

Ok/Err are marked final, which makes sense. However, being able to extend them would drastically reduce the diffs and footprint of this library as a dependency. For example,

namespace MyOwnNamespace\Client\Result;

class Err extends \TH\Maybe\Result\Err implements \MyOwnNamespace\Client\Result

This would import all the functionality of \TH\Maybe\Result\Err, and prevent the need to change function signatures all throughout the app. Thoughts on making this change?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions