for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Maiorano\Shortcodes\Exceptions;
use Maiorano\Shortcodes\Contracts\AliasInterface;
/**
* Class RegisterException.
*/
final class RegisterException extends ShortcodeException
{
* @const string
const DUPLICATE = 'The shortcode \'%s\' has already been registered';
const NO_ALIAS = 'Cannot alias a shortcode that does not implement '.AliasInterface::class;
* @return static
public static function blank(): self
return new static(parent::BLANK);
}
* @param string $name
*
public static function missing(string $name): self
$e = sprintf(parent::MISSING, $name);
return new static($e);
public static function duplicate(string $name): self
$e = sprintf(self::DUPLICATE, $name);
public static function noAlias(): self
return new static(self::NO_ALIAS);