comsave/safe-salesforce-saver-bundle

View on GitHub
src/Comsave/SafeSalesforceSaverBundle/Factory/ExceptionMessageFactory.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%
<?php

namespace Comsave\SafeSalesforceSaverBundle\Factory;

class ExceptionMessageFactory
{
    public static function build(object $occurredInObject, array $messages): string
    {
        return vsprintf('SafeSalesforceSaver. In `%s` occured `%s`.', [
            substr(strrchr(get_class($occurredInObject), "\\"), 1),
            implode('. ', $messages)
        ]);
    }
}