Function voteJodel
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
function voteJodel($jodel2vote, $how2vote){
global $apiroot, $baseurl, $config;
$callurl = $apiroot . "jodels?transform=1&filter=jodelID,eq," . $jodel2vote;
$jodeljson = getCall($callurl);
Function voteComment
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
function voteComment( $comment2vote, $how2vote){
global $apiroot, $baseurl, $config;
$userid = $_SESSION['userid'];
$apiroot = $config->apiUrl;
$commentsjson = getCall($apiroot . "comments?transform=1&filter=commentID,eq," . $comment2vote);
Method voteComment
has 65 lines of code (exceeds 25 allowed). Consider refactoring.
function voteComment( $comment2vote, $how2vote){
global $apiroot, $baseurl, $config;
$userid = $_SESSION['userid'];
$apiroot = $config->apiUrl;
$commentsjson = getCall($apiroot . "comments?transform=1&filter=commentID,eq," . $comment2vote);
Method voteJodel
has 63 lines of code (exceeds 25 allowed). Consider refactoring.
function voteJodel($jodel2vote, $how2vote){
global $apiroot, $baseurl, $config;
$callurl = $apiroot . "jodels?transform=1&filter=jodelID,eq," . $jodel2vote;
$jodeljson = getCall($callurl);
The function voteJodel() has an NPath complexity of 435. The configured NPath complexity threshold is 200.
function voteJodel($jodel2vote, $how2vote){
global $apiroot, $baseurl, $config;
$callurl = $apiroot . "jodels?transform=1&filter=jodelID,eq," . $jodel2vote;
$jodeljson = getCall($callurl);
The function voteComment() has an NPath complexity of 435. The configured NPath complexity threshold is 200.
function voteComment( $comment2vote, $how2vote){
global $apiroot, $baseurl, $config;
$userid = $_SESSION['userid'];
$apiroot = $config->apiUrl;
$commentsjson = getCall($apiroot . "comments?transform=1&filter=commentID,eq," . $comment2vote);
The function voteJodel() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10.
function voteJodel($jodel2vote, $how2vote){
global $apiroot, $baseurl, $config;
$callurl = $apiroot . "jodels?transform=1&filter=jodelID,eq," . $jodel2vote;
$jodeljson = getCall($callurl);
The function voteComment() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10.
function voteComment( $comment2vote, $how2vote){
global $apiroot, $baseurl, $config;
$userid = $_SESSION['userid'];
$apiroot = $config->apiUrl;
$commentsjson = getCall($apiroot . "comments?transform=1&filter=commentID,eq," . $comment2vote);
Avoid unused local variables such as '$uservoted'.
$uservoted = postCall($callurl,$postfields);
Avoid unused local variables such as '$karmaupdated'.
$karmaupdated = putCall($callurl, $postfields);
Avoid unused local variables such as '$karmaupdated'.
$karmaupdated = putCall($callurl, $postfields);
Avoid unused local variables such as '$uservoted'.
$uservoted = postCall($callurl,$postfields);
There are no issues that match your filters.