GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 30-31 lines in 2 locations

phpmyfaq/ajaxservice.php 2 locations

@@ 569-599 (lines=31) @@
566
                    $response .= '</ul>';
567
568
                    $message = array('result' => $response);
569
                } else {
570
571
                    $faq->addQuestion($questionData);
572
573
                    $questionMail = 'User: '.$questionData['username'].
574
                                ', mailto:'.$questionData['email']."\n".$PMF_LANG['msgCategory'].
575
                                ': '.$categories[$questionData['category_id']]['name']."\n\n".
576
                                wordwrap($question, 72)."\n\n".
577
                                $faqConfig->getDefaultUrl().'admin/';
578
579
                    $userId = $cat->getOwner($questionData['category_id']);
580
                    $oUser  = new User($faqConfig);
581
                    $oUser->getUserById($userId);
582
583
                    $userEmail = $oUser->getUserData('email');
584
                    $mainAdminEmail = $faqConfig->get('main.administrationMail');
585
586
                    $mail = new Mail($faqConfig);
587
                    $mail->setReplyTo($questionData['email'], $questionData['username']);
588
                    $mail->addTo($mainAdminEmail);
589
                    // Let the category owner get a copy of the message
590
                    if (!empty($userEmail) && $mainAdminEmail != $userEmail) {
591
                        $mail->addCc($userEmail);
592
                    }
593
                    $mail->subject = '%sitename%';
594
                    $mail->message = $questionMail;
595
                    $mail->send();
596
                    unset($mail);
597
598
                    $message = array('success' => $PMF_LANG['msgAskThx4Mail']);
599
                }
600
            } else {
601
                $faq->addQuestion($questionData);
602
@@ 600-629 (lines=30) @@
597
598
                    $message = array('success' => $PMF_LANG['msgAskThx4Mail']);
599
                }
600
            } else {
601
                $faq->addQuestion($questionData);
602
603
                $questionMail = 'User: '.$questionData['username'].
604
                                ', mailto:'.$questionData['email']."\n".$PMF_LANG['msgCategory'].
605
                                ': '.$categories[$questionData['category_id']]['name']."\n\n".
606
                                wordwrap($question, 72)."\n\n".
607
                                $faqConfig->getDefaultUrl().'admin/';
608
609
                $userId = $cat->getOwner($questionData['category_id']);
610
                $oUser  = new User($faqConfig);
611
                $oUser->getUserById($userId);
612
613
                $userEmail = $oUser->getUserData('email');
614
                $mainAdminEmail = $faqConfig->get('main.administrationMail');
615
616
                $mail = new Mail($faqConfig);
617
                $mail->setReplyTo($questionData['email'], $questionData['username']);
618
                $mail->addTo($mainAdminEmail);
619
                // Let the category owner get a copy of the message
620
                if (!empty($userEmail) && $mainAdminEmail != $userEmail) {
621
                    $mail->addCc($userEmail);
622
                }
623
                $mail->subject = '%sitename%';
624
                $mail->message = $questionMail;
625
                $mail->send();
626
                unset($mail);
627
628
                $message = array('success' => $PMF_LANG['msgAskThx4Mail']);
629
            }
630
        } else {
631
            $message = array('error' => $PMF_LANG['err_SaveQuestion']);
632
        }