Skip to content
Snippets Groups Projects
Select Git revision
  • 7776ea61d531ee8d127abfd9d8f6e4b76e3f56e6
  • main default protected
  • v0.10
  • 0.10.6
  • 0.10.5
  • 0.10.4
  • 0.10.3
  • 0.10.2
  • 0.10.1
  • 0.10.0
  • 0.9.1
  • 0.9.0
12 results

phpcs.xml.dist

Blame
  • MailerException.php 441 B
    <?php
    
    declare( strict_types=1 );
    
    namespace WPDesk\Library\WPEmail\Exceptions;
    
    use RuntimeException;
    use WP_Error;
    
    class MailerException extends RuntimeException {
    
        public static function with_wp_error( WP_Error $error ): self {
            $errors  = $error->get_error_messages( 'wp_mail_failed' );
            $message = implode( "\n", $errors );
    
            return new self( sprintf( 'wp_mail() failure. Message [%s]', $message ) );
        }
    }