| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | protected function handleInternal() |
||
| 11 | { |
||
| 12 | $like = $this->getLike(); |
||
| 13 | if ($like) { |
||
| 14 | return; |
||
| 15 | } |
||
| 16 | |||
| 17 | // creates new like record |
||
| 18 | $like = ArticleLikeFactory::create((int) $this->id, (int) $this->getUser()->getId()); |
||
| 19 | if (!$like->save()) { |
||
| 20 | $this->addErrors($like->getErrors()); |
||
| 21 | } |
||
| 24 |