Showing 80 of 587 total issues
Function handleRemoteCall
has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring. Open
public function handleRemoteCall() {
header("Access-Control-Allow-Headers: *");
header("Access-Control-Allow-Origin: *");
- Read upRead up
- Create a ticketCreate a ticket
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
File MDatabaseDatastore.php
has 582 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace webfilesframework\core\datastore\types\database;
use Exception;
- Create a ticketCreate a ticket
Function getWebfilesByTablename
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
private function getWebfilesByTablename($tableName,$className = null,$condition = null,$order = null)
{
$webfileArray = array();
- Read upRead up
- Create a ticketCreate a ticket
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 getDatatypeFromAttributeName
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
public static function getDatatypeFromAttributeName($attributeName)
{
$typeIdentifier = self::getTypeIdentifier($attributeName);
if ($typeIdentifier == "s") {
- Read upRead up
- Create a ticketCreate a ticket
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 getFormItemByAttributeType
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public static function getFormItemByAttributeType($attributeType, $attributeName, $attributeValue = "", $localizedName = "")
{
if ($attributeType == "integer") {
$formItem = new MTextfieldFormItem($attributeName, $attributeValue, $localizedName);
- Read upRead up
- Create a ticketCreate a ticket
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 store
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
private function store(MWebfile $webfile, $useOnlySimpleDatatypes = false)
{
$tablename = $this->resolveTableNameForWebfile($webfile);
- Read upRead up
- Create a ticketCreate a ticket
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 update
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
private function update(MWebfile $webfile, $useOnlySimpleDatatypes = false)
{
$oAttributeArray = $webfile->getAttributes();
- Read upRead up
- Create a ticketCreate a ticket
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
MDatabaseDatastore
has 34 functions (exceeds 20 allowed). Consider refactoring. Open
class MDatabaseDatastore extends MAbstractDatastore
implements MISingleDatasourceDatastore
{
private $databaseConnection;
- Create a ticketCreate a ticket
File MWebfile.php
has 333 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace webfilesframework\core\datasystem\file\format;
use ReflectionClass;
use ReflectionException;
- Create a ticketCreate a ticket
Function getFormItemByAttributeName
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public static function getFormItemByAttributeName($attributeName, $attributeValue, $localizedName = "")
{
$attributeType = substr($attributeName, 2, 1);
- Read upRead up
- Create a ticketCreate a ticket
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 createTableColumnFromAttributeName
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
private function createTableColumnFromAttributeName($sAttributeName)
{
$prefix = substr($sAttributeName, 2, 1);
if ($prefix == "s") { // string (width = 50)
return new MDatabaseTableColumn(
- Read upRead up
- Create a ticketCreate a ticket
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 translateTemplateIntoCondition
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
private function translateTemplateIntoCondition(MWebfile $webfile)
{
$first = true;
$condition = "";
- Read upRead up
- Create a ticketCreate a ticket
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
Method handleRemoteCall
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handleRemoteCall() {
header("Access-Control-Allow-Headers: *");
header("Access-Control-Allow-Origin: *");
- Create a ticketCreate a ticket
MWebfile
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
class MWebfile {
protected $m_iId = 0;
/**
- Create a ticketCreate a ticket
Function syncToLocalDirectory
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function syncToLocalDirectory(MDirectory $directory, $recursivly, $folder)
{
//var_dump($folder);
- Read upRead up
- Create a ticketCreate a ticket
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 init
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function init($useLabel = true)
{
$this->code = "";
- Read upRead up
- Create a ticketCreate a ticket
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
MDirectoryDatastore
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class MDirectoryDatastore extends MAbstractCachableDatastore
implements MISingleDatasourceDatastore
{
/** @var MDirectory */
- Create a ticketCreate a ticket
Method init
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init($useLabel = true)
{
$this->code = "";
- Create a ticketCreate a ticket
MImage
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class MImage extends MFile
{
protected $m_oImage;
- Create a ticketCreate a ticket
MMail
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class MMail extends MWebfile
{
private $m_sFrom;
private $m_sTo;
- Create a ticketCreate a ticket