swiftmailer/swiftmailer — Issue #123: Documentation improvement for Swift_Mime_Message interface
Author: FractalizeR
Created: 2011-10-19 14:15:36+00:00
State: open

Since SwiftMailer uses fluent API, it would be good if all Swift_Mime_Message and it's descendant methods would be documented as at least returning ``self`` like this:

```php
/**
* Set the subject of the message.
*
* @param string $subject
* @return Swift_Mime_Message
*/
public function setSubject($subject);
```

Currently we have "Undefined method" hint in IDEs like PHPStorm on using call chain like this:

```php
\Swift_Message::newInstance(...)->setFrom(...)->setSubject(...)->setTo(...)->setBody(...);
```