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