| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public static function addSentEmails(EntityManager $manager, $count) |
||
| 14 | { |
||
| 15 | while ($count > 0) { |
||
| 16 | $sentEmail = new SentEmail(); |
||
| 17 | $sentEmail->setRecipients(array('[email protected]')); |
||
| 18 | $sentEmail->setSent(new \DateTime("2 weeks ago")); |
||
| 19 | $sentEmail->setTemplate(AzineTemplateProvider::NEWSLETTER_TEMPLATE); |
||
| 20 | $sentEmail->setVariables(array()); |
||
| 21 | $sentEmail->setToken('fdasdfasfafsadf'); |
||
| 22 | $manager->persist($sentEmail); |
||
| 23 | |||
| 24 | $count--; |
||
| 25 | } |
||
| 26 | $manager->flush(); |
||
| 27 | } |
||
| 28 | } |
||
| 29 |