Completed
Pull Request — master (#421)
by Robbie
02:52
created

BlogPostNotifications::updateNotificationSubject()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 3
1
<?php
2
3
namespace SilverStripe\Blog\Model;
4
5
use SilverStripe\ORM\DataExtension;
6
7
/**
8
 * Customise blog post to support comment notifications.
9
 *
10
 * Extends {@see BlogPost} with extensions to {@see CommentNotifiable}.
11
 */
12
class BlogPostNotifications extends DataExtension
13
{
14
    /**
15
     * Notify all authors of notifications.
16
     *
17
     * @param SS_List $list
18
     * @param mixed $comment
19
     */
20
    public function updateNotificationRecipients(&$list, &$comment)
0 ignored issues
show
Unused Code introduced by
The parameter $comment is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
21
    {
22
        $list = $this->owner->Authors();
23
    }
24
25
    /**
26
     * Update comment to include the page title.
27
     *
28
     * @param string $subject
29
     * @param Comment $comment
30
     * @param Member|string $recipient
31
     */
32
    public function updateNotificationSubject(&$subject, &$comment, &$recipient)
0 ignored issues
show
Unused Code introduced by
The parameter $comment is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $recipient is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
33
    {
34
        $subject = sprintf('A new comment has been posted on %s', $this->owner->Title);
35
    }
36
}
37