src/Enum/Matcher.php
public function get()
    {
        return array_key_exists($this->subject->getName(), $this->matches)
            ? $this->matches[$this->subject->getName()]->get()
            : $this->surrogate->get();
    }
public function get()
    {
        return array_key_exists($this->subject->getName(), $this->matches)
            ? $this->matches[$this->subject->getName()]->get()
            : $this->surrogate->get();
    }
public function get ( ) { return array_key_exists ( $ this -> subject -> getName ( ) , $ this -> matches ) ? $ this -> matches [ $ this -> subject -> getName ( ) ] -> get ( ) : $ this -> surrogate -> get ( ) ; }
Provides the value the instance of the mapped subject is mapped to, or throws a runtime exception if the instance
has not been mapped to anything.

<br/>

For example:

<br/>

```
$fruit
->when(Fruit::BANANA(), 'banana')
->when(Fruit::APPLE(), 'apple')
->get();
```

<br/>

will yield:

<br/>

`'banana'` if `$fruit = Fruit::BANANA()` or

<br/>

`'apple'` if `$fruit = Fruit::APPLE()` or

<br/>

a thrown exception if `$fruit = Fruit::EGGPLANT()`

@return mixed
@throws Enum\Matcher\Exception\MatchExhausted
Provides the value the instance of the mapped subject is mapped to or throws a runtime exception if the instance has not been mapped to anything .