Showing 9 of 765 total issues
Method printHeader
has 170 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function printHeader($version = null)
{
if (true) : ?>
<!DOCTYPE html>
<html>
Method printForm
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function printForm()
{
if (true) : ?>
<form method="POST">
<label for="user_name">Username:<span class="required">*</span></label>
Method htaccess
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function htaccess()
{
return <<<EOT
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
Method saveConfigs
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function saveConfigs()
{
$this->extractUser();
//save config.ini
$config = array(
Function convertRequestToConfig
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function convertRequestToConfig()
{
$array = array();
foreach ($_REQUEST as $name => $value) {
if (!is_string($value) || empty($value)) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function addDirToPhar
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function addDirToPhar($dirName)
{
$dirName = rtrim($dirName, "/") . "/";
foreach (scandir($dirName) as $key => $value) {
if (!in_array($value, array(".", ".."))) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function isWritable
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function isWritable($path)
{
//will work in despite of Windows ACLs bug
//NOTE: use a trailing slash for folders!!!
//see http://bugs.php.net/bug.php?id=27609
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function run()
{
$string = "";
if (!empty($this->errors)) {
foreach ($this->errors as $error) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function testTheEnvironment
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function testTheEnvironment()
{
$messages = new Messages;
if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"