src/Property/UnmappableProperty.php
private static function inputData(
        MapsProperty $mapped,
        string $type,
        $input,
        string $message = ''
    ): Throwable {
        if (is_scalar($input)) {
            return new self(trim(sprintf(
                'Cannot assign `%s` to property `%s`: ' .
                'it is not clean for conversion to %s. %s',
                $input, $mapped->name(), $type, $message
            )));
        }
        return new self(trim(sprintf(
            'Cannot assign the %s to property `%s`: ' .
            'it is not clean for conversion to %s. %s',
            gettype($input), $mapped->name(), $type, $message
        )));
    }
private static function inputData(
        MapsProperty $mapped,
        string $type,
        $input,
        string $message = ''
    ): Throwable {
        if (is_scalar($input)) {
            return new self(trim(sprintf(
                'Cannot assign `%s` to property `%s`: ' .
                'it is not clean for conversion to %s. %s',
                $input, $mapped->name(), $type, $message
            )));
        }
        return new self(trim(sprintf(
            'Cannot assign the %s to property `%s`: ' .
            'it is not clean for conversion to %s. %s',
            gettype($input), $mapped->name(), $type, $message
        )));
    }
private static function inputData ( MapsProperty $ mapped , string $ type , $ input , string $ message = '' ) : Throwable { if ( is_scalar ( $ input ) ) { return new self ( trim ( sprintf ( 'Cannot assign `%s` to property `%s`: ' . 'it is not clean for conversion to %s. %s' , $ input , $ mapped -> name ( ) , $ type , $ message ) ) ) ; } return new self ( trim ( sprintf ( 'Cannot assign the %s to property `%s`: ' . 'it is not clean for conversion to %s. %s' , gettype ( $ input ) , $ mapped -> name ( ) , $ type , $ message ) ) ) ; }
Notifies the client code when the input is not mappable.

@param MapsProperty $mapped  The mapping that failed.
@param string       $type    The type of data that was expected.
@param mixed        $input   The input that could not be mapped.
@param string       $message Optional extra message.
@return Throwable            The exception to throw.
Notifies the client code when the input is not mappable .