| Conditions | 4 |
| Paths | 6 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4.25 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 37 | 1 | public function beforeSendPerformed(Swift_Events_SendEvent $event) |
|
| 38 | { |
||
| 39 | 1 | $message = $event->getMessage(); |
|
| 40 | |||
| 41 | 1 | if ($message->getContentType() === 'text/html') { |
|
| 42 | 1 | $message->setBody($this->converter->convert($message->getBody())); |
|
| 43 | } |
||
| 44 | |||
| 45 | 1 | foreach ($message->getChildren() as $part) { |
|
| 46 | if (strpos($part->getContentType(), 'text/html') === 0) { |
||
| 47 | $part->setBody($this->converter->convert($part->getBody())); |
||
| 48 | } |
||
| 49 | } |
||
| 50 | 1 | } |
|
| 51 | |||
| 62 |