original_string: private function buildDestination($emails) 
      {
          $ret = ['ToAddresses' => isset($emails['to']) ? $emails['to'] : array_values($emails)];
          if (isset($emails['cc']) && $emails['cc'])
              $ret['CcAddresses'] = $emails['cc'];
          if (isset($emails['bcc']) && $emails['cc'])
              $ret['BccAddresses'] = $emails['bcc'];
          return $ret;
      }
code: private function buildDestination($emails) 
      {
          $ret = ['ToAddresses' => isset($emails['to']) ? $emails['to'] : array_values($emails)];
          if (isset($emails['cc']) && $emails['cc'])
              $ret['CcAddresses'] = $emails['cc'];
          if (isset($emails['bcc']) && $emails['cc'])
              $ret['BccAddresses'] = $emails['bcc'];
          return $ret;
      }
code_tokens: private function buildDestination ( $ emails ) { $ ret = [ 'ToAddresses' => isset ( $ emails [ 'to' ] ) ? $ emails [ 'to' ] : array_values ( $ emails ) ] ; if ( isset ( $ emails [ 'cc' ] ) && $ emails [ 'cc' ] ) $ ret [ 'CcAddresses' ] = $ emails [ 'cc' ] ; if ( isset ( $ emails [ 'bcc' ] ) && $ emails [ 'cc' ] ) $ ret [ 'BccAddresses' ] = $ emails [ 'bcc' ] ; return $ ret ; }
docstring: Create an array mapped with 'ToAddesses', 'CcAddresses', 'BccAddresses'
  
  @param array $emails destinations as a simple array or associative in the form:
  ['to' => [email1, email2, ...], 'cc' => [ etc..], bcc => [etc...]]
  @return array destinations in AWS format
docstring_tokens: Create an array mapped with ToAddesses CcAddresses BccAddresses