src/SellerLabs/Nucleus/Data/Exceptions/MismatchedDataTypesException.php
public function setExpectedAndReceived($expected, $received)
    {
        $this->expected = is_string($expected)
            ? $expected : get_class($expected);

        $this->received = TypeHound::fetch($received);

        $this->message = vsprintf(
            'An instance of a %s was expected but got %s',
            [$this->expected, $this->received]
        );
    }
public function setExpectedAndReceived($expected, $received)
    {
        $this->expected = is_string($expected)
            ? $expected : get_class($expected);

        $this->received = TypeHound::fetch($received);

        $this->message = vsprintf(
            'An instance of a %s was expected but got %s',
            [$this->expected, $this->received]
        );
    }
public function setExpectedAndReceived ( $ expected , $ received ) { $ this -> expected = is_string ( $ expected ) ? $ expected : get_class ( $ expected ) ; $ this -> received = TypeHound :: fetch ( $ received ) ; $ this -> message = vsprintf ( 'An instance of a %s was expected but got %s' , [ $ this -> expected , $ this -> received ] ) ; }
Set the expected class and the received value.

@param string|object $expected
@param mixed $received
Set the expected class and the received value .