fossasia/engelsystem

View on GitHub
includes/helper/message_helper.php

Summary

Maintainability
B
4 hrs
Test Coverage

Showing 6 of 6 total issues

Function success has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function success($msg, $immediatly = false) {
if ($immediatly) {
if ($msg == "")
return "";
return '<div class="alert alert-success">' . $msg . '</div>';
Severity: Minor
Found in includes/helper/message_helper.php - About 35 mins to fix

Function info has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function info($msg, $immediatly = false) {
if ($immediatly) {
if ($msg == "")
return "";
return '<div class="alert alert-info">' . $msg . '</div>';
Severity: Minor
Found in includes/helper/message_helper.php - About 35 mins to fix

Function error has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function error($msg, $immediatly = false) {
if ($immediatly) {
if ($msg == "")
return "";
return '<div class="alert alert-danger">' . $msg . '</div>';
Severity: Minor
Found in includes/helper/message_helper.php - About 35 mins to fix

Similar blocks of code found in 3 locations. Consider refactoring.
Open

function success($msg, $immediatly = false) {
if ($immediatly) {
if ($msg == "")
return "";
return '<div class="alert alert-success">' . $msg . '</div>';
Severity: Major
Found in includes/helper/message_helper.php and 2 other locations - About 45 mins to fix
includes/helper/message_helper.php on lines 17..27
includes/helper/message_helper.php on lines 32..42

Similar blocks of code found in 3 locations. Consider refactoring.
Open

function error($msg, $immediatly = false) {
if ($immediatly) {
if ($msg == "")
return "";
return '<div class="alert alert-danger">' . $msg . '</div>';
Severity: Major
Found in includes/helper/message_helper.php and 2 other locations - About 45 mins to fix
includes/helper/message_helper.php on lines 17..27
includes/helper/message_helper.php on lines 47..57

Similar blocks of code found in 3 locations. Consider refactoring.
Open

function info($msg, $immediatly = false) {
if ($immediatly) {
if ($msg == "")
return "";
return '<div class="alert alert-info">' . $msg . '</div>';
Severity: Major
Found in includes/helper/message_helper.php and 2 other locations - About 45 mins to fix
includes/helper/message_helper.php on lines 32..42
includes/helper/message_helper.php on lines 47..57

There are no issues that match your filters.

Category
Status