| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 41 | public function createNewWithArticleOrComment(string $articleId, string $commentId = null): ArticleCommentInterface |
||
| 42 | { |
||
| 43 | /** @var \Odiseo\SyliusBlogPlugin\Entity\ArticleCommentInterface $articleComment */ |
||
| 44 | $articleComment = $this->decoratedFactory->createNewWithArticleOrComment($articleId, $commentId); |
||
| 45 | |||
| 46 | if ($this->shopUser instanceof ShopUserInterface) { |
||
| 47 | $articleComment->setAuthor($this->shopUser); |
||
| 48 | } |
||
| 49 | |||
| 50 | return $articleComment; |
||
| 51 | } |
||
| 53 |