public static function errorMessage(object $object, string $part, bool $forMethod): string
    {
        return
            sprintf(
                static::EXCEPTION_TEMPLATE,
                \get_class($object),
                $part,
                $forMethod ? static::METHOD : static::PROPERTY
            );
    }
public static function errorMessage(object $object, string $part, bool $forMethod): string
    {
        return
            sprintf(
                static::EXCEPTION_TEMPLATE,
                \get_class($object),
                $part,
                $forMethod ? static::METHOD : static::PROPERTY
            );
    }
public static function errorMessage ( object $ object , string $ part , bool $ forMethod ) : string { return sprintf ( static :: EXCEPTION_TEMPLATE , \ get_class ( $ object ) , $ part , $ forMethod ? static :: METHOD : static :: PROPERTY ) ; }
Creates an error message.

@param object $object
@param string $part
@param bool $forMethod

@return string
Creates an error message .