| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | public function execute($commentId, $eventName) |
||
| 46 | { |
||
| 47 | $event = CommentEventBuilder::getInstance($this->container) |
||
| 48 | ->withCommentId($commentId) |
||
| 49 | ->buildEvent(); |
||
| 50 | |||
| 51 | if ($event !== null) { |
||
| 52 | $this->dispatcher->dispatch($eventName, $event); |
||
|
|
|||
| 53 | |||
| 54 | if ($eventName === CommentModel::EVENT_CREATE) { |
||
| 55 | $this->userMentionModel->fireEvents($event['comment']['comment'], CommentModel::EVENT_USER_MENTION, $event); |
||
| 56 | } |
||
| 57 | } |
||
| 58 | } |
||
| 59 | } |
||
| 60 |
Since your code implements the magic getter
_get, this function will be called for any read access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.