original_string: protected function getMailer($name, Email $email = null)
      {
          if ($email === null) {
              $email = new Email();
          }
  
          $className = App::className($name, 'Mailer', 'Mailer');
  
          if (empty($className)) {
              throw new MissingMailerException(compact('name'));
          }
  
          return new $className($email);
      }
code: protected function getMailer($name, Email $email = null)
      {
          if ($email === null) {
              $email = new Email();
          }
  
          $className = App::className($name, 'Mailer', 'Mailer');
  
          if (empty($className)) {
              throw new MissingMailerException(compact('name'));
          }
  
          return new $className($email);
      }
code_tokens: protected function getMailer ( $ name , Email $ email = null ) { if ( $ email === null ) { $ email = new Email ( ) ; } $ className = App :: className ( $ name , 'Mailer' , 'Mailer' ) ; if ( empty ( $ className ) ) { throw new MissingMailerException ( compact ( 'name' ) ) ; } return new $ className ( $ email ) ; }
docstring: Returns a mailer instance.
  
  @param string $name Mailer's name.
  @param \Cake\Mailer\Email|null $email Email instance.
  @return \Cake\Mailer\Mailer
  @throws \Cake\Mailer\Exception\MissingMailerException if undefined mailer class.
docstring_tokens: Returns a mailer instance .