Code Duplication    Length = 10-10 lines in 2 locations

code/admin/CommentsGridFieldAction.php 2 locations

@@ 88-97 (lines=10) @@
85
     */
86
    public function handleAction(GridField $gridField, $actionName, $arguments, $data)
87
    {
88
        if ($actionName == 'spam') {
89
            $comment = Comment::get()->byID($arguments["RecordID"]);
90
            $comment->markSpam();
91
92
            // output a success message to the user
93
            Controller::curr()->getResponse()->setStatusCode(
94
                200,
95
                'Comment marked as spam.'
96
            );
97
        }
98
99
        if ($actionName == 'approve') {
100
            $comment = Comment::get()->byID($arguments["RecordID"]);
@@ 99-108 (lines=10) @@
96
            );
97
        }
98
99
        if ($actionName == 'approve') {
100
            $comment = Comment::get()->byID($arguments["RecordID"]);
101
            $comment->markApproved();
102
103
            // output a success message to the user
104
            Controller::curr()->getResponse()->setStatusCode(
105
                200,
106
                'Comment approved.'
107
            );
108
        }
109
    }
110
}
111