Code Duplication    Length = 6-7 lines in 2 locations

class/faq.php 2 locations

@@ 503-509 (lines=7) @@
500
501
        foreach ($notifications as $notification) {
502
            switch ($notification) {
503
                case _SF_NOT_FAQ_PUBLISHED:
504
                    $tags['FAQ_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/faq.php?faqid=' . $this->faqid();
505
506
                    $notificationHandler->triggerEvent('global_faq', 0, 'published', $tags);
507
                    $notificationHandler->triggerEvent('category_faq', $this->categoryid(), 'published', $tags);
508
                    $notificationHandler->triggerEvent('faq', $this->faqid(), 'approved', $tags);
509
                    break;
510
511
                case _SF_NOT_FAQ_SUBMITTED:
512
                    $tags['WAITINGFILES_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/admin/faq.php?faqid=' . $this->faqid();
@@ 517-522 (lines=6) @@
514
                    $notificationHandler->triggerEvent('category_faq', $this->categoryid(), 'submitted', $tags);
515
                    break;
516
517
                case _SF_NOT_QUESTION_PUBLISHED:
518
                    $tags['FAQ_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/answer.php?faqid=' . $this->faqid();
519
                    $notificationHandler->triggerEvent('global_question', 0, 'published', $tags);
520
                    $notificationHandler->triggerEvent('category_question', $this->categoryid(), 'published', $tags);
521
                    $notificationHandler->triggerEvent('question', $this->faqid(), 'approved', $tags);
522
                    break;
523
524
                case _SF_NOT_QUESTION_SUBMITTED:
525
                    $tags['WAITINGFILES_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/admin/question.php?op=mod&faqid=' . $this->faqid();