Showing 8 of 8 total issues
Method reportContent
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function reportContent( $content, $contentID, $reason){ global $apiroot; $userid = $_SESSION['userid']; if($content == "post"){ $postfields = "{\n \n \"abuseIDFK\": \"$reason\",\n \"jodelDFK\": \"$contentID\"\n,\n \"jodlerIDFK\": \"$userid\"\n}";
- Create a ticketCreate a ticket
Function getAccountType
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function getAccountType($config, $acctype){ //init array $usertype = (object) array(); switch($acctype){ case 0:
- Read upRead up
- Create a ticketCreate a ticket
Function reportContent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function reportContent( $content, $contentID, $reason){ global $apiroot; $userid = $_SESSION['userid']; if($content == "post"){ $postfields = "{\n \n \"abuseIDFK\": \"$reason\",\n \"jodelDFK\": \"$contentID\"\n,\n \"jodlerIDFK\": \"$userid\"\n}";
- Read upRead up
- Create a ticketCreate a ticket
Avoid using undefined variables such as '$config' which will lead to PHP notices. Open
$newscore = $score - $config->postmeta['get_report'];
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Avoid using undefined variables such as '$config' which will lead to PHP notices. Open
$newscore = $score - $config->postmeta['get_report'];
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Avoid unused local variables such as '$scoreupdate'. Open
$scoreupdate = putCall($callurl, $putfields);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Similar blocks of code found in 2 locations. Consider refactoring. Open
} elseif($content == "comment"){ $postfields = "{\n \n \"abuseIDFK\": \"$reason\",\n \"commentIDFK\": \"$contentID\"\n,\n \"jodlerIDFK\": \"$userid\"\n}"; $callurl = $apiroot . "comments?filter=commentID,eq," . $contentID . "&transform=1"; $commentjson = getCall($callurl); $scores = json_decode($commentjson, true);
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
if($content == "post"){ $postfields = "{\n \n \"abuseIDFK\": \"$reason\",\n \"jodelDFK\": \"$contentID\"\n,\n \"jodlerIDFK\": \"$userid\"\n}"; $callurl = $apiroot . "jodels?filter=jodelID,eq," . $contentID . "&transform=1"; $jodeljson = getCall($callurl); $scores = json_decode($jodeljson, true);
- Read upRead up
- Create a ticketCreate a ticket