Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Apr 25, 2016
1 parent de7975d commit c19afff
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Transport/SparkPostTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,16 @@ protected function getRecipients(Swift_Mime_Message $message)
}

/**
* Get From in a format needed by SparkPost.
* Get the "from" contacts in the format required by SparkPost.
*
* @param Swift_Mime_Message $message
* @param Swift_Mime_Message $message
* @return array
*/
protected function getFrom(Swift_Mime_Message $message)
{
$from = array_map(function ($email, $name) {
return array_map(function ($email, $name) {
return compact('name', 'email');
}, array_keys($message->getFrom()), $message->getFrom());

return $from[0];
}, array_keys($message->getFrom()), $message->getFrom())[0];
}

/**
Expand Down

0 comments on commit c19afff

Please sign in to comment.