for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Asmaster\EquipTwig\Exception;
use Asmaster\EquipTwig\Exception\ExceptionInterface;
use InvalidArgumentException;
use Twig_ExtensionInterface as TwigExtensionInterface;
class ExtensionException extends InvalidArgumentException implements ExceptionInterface
{
/**
* @param string|object $spec
*
* @return static
*/
public static function invalidClass($spec)
if (is_object($spec)) {
$spec = get_class($spec);
}
return new static(sprintf(
'Twig extension `%s` must implement `%s`',
$spec,
TwigExtensionInterface::class
));