for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace UnicornFail\Emoji\Exception;
class ExtensionRequiredLibraryException extends \RuntimeException implements EmojiException
{
public function __construct(string $library, ?object $object = null, ?\Throwable $previous = null)
$class = $object
? \get_class($object)
: false;
if ($class !== false) {
$message = \sprintf("%s requires the following library to be installed:\n\ncomposer require %s\n\n", $class, $library);
} else {
$message = \sprintf("The following library is required to be installed:\n\ncomposer require %s\n\n", $library);
}
parent::__construct($message, 0, $previous);