| Conditions | 3 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 50 | public function send(): void |
||
| 51 | { |
||
| 52 | $article = new Article(); |
||
| 53 | $article->setAuthor($this->author); |
||
| 54 | $article->setStatus(ArticleStatus::PUBLISHED); |
||
| 55 | $article->setPublishedAt(new \DateTime()); |
||
| 56 | |||
| 57 | foreach ($this->titles as $lang => $value) { |
||
| 58 | $article->setTitle($value, $lang); |
||
| 59 | } |
||
| 60 | foreach ($this->contents as $lang => $value) { |
||
| 61 | $article->setContent($value, $lang); |
||
| 62 | } |
||
| 63 | |||
| 64 | $this->em->persist($article); |
||
| 65 | $this->em->flush(); |
||
| 66 | } |
||
| 68 |