Showing 714 of 844 total issues
Method displaySettingsPanel
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function displaySettingsPanel(XMLElement &$wrapper, $errors = null)
{
Field::displaySettingsPanel($wrapper, $errors);
$div = new XMLElement('div', null, array('class' => 'two columns'));
Method filter
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function filter(EntryQuery $query, array $filters, $operator = 'or')
{
General::ensureType([
'operator' => ['var' => $operator, 'type' => 'string'],
]);
Method processParametersInString
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function processParametersInString($value, array $env, $includeParenthesis = true, $escape = false)
{
if (trim($value) == '') {
return null;
}
Method __build
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function __build($version = VERSION, XMLElement $extra = null)
{
parent::__build();
$this->Form = Widget::Form(INSTALL_URL . '/index.php', 'post');
Method generate
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function generate($indent = false, $tabDepth = 0)
{
$result = null;
$newline = ($indent ? PHP_EOL : null);
$addedNewline = false;
Method read
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function read($hash, $namespace = null)
{
$data = false;
$query = $this->Database
->select()
Method buildSectionNavigation
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function buildSectionNavigation(&$nav)
{
// Build the section navigation, grouped by their navigation groups
$sections = (new SectionManager)->select()->sort('sortorder')->execute()->rows();
Method buildTableHeaders
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function buildTableHeaders($columns, $sort, $order, $extra_url_params = null)
{
$aTableHead = array();
foreach ($columns as $c) {
Function listAll
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static function listAll()
{
$structure = General::listStructure(TOOLKIT . '/fields', '/field.[a-z0-9_-]+.php/i', false, 'asc', TOOLKIT . '/fields');
$extensions = Symphony::ExtensionManager()->listInstalledHandles();
$types = 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 send
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function send()
{
$this->validate();
$settings = 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 __getClassPath
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static function __getClassPath($type)
{
if (is_file(TOOLKIT . "/fields/field.{$type}.php")) {
return TOOLKIT . '/fields';
} else {
- 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 __getClassPath
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static function __getClassPath($handle)
{
if (is_file(DATASOURCES . "/data.$handle.php")) {
return DATASOURCES;
} else {
- 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 __getClassPath
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static function __getClassPath($name)
{
if (is_file(EMAILGATEWAYS . "/email.$name.php")) {
return EMAILGATEWAYS;
} else {
- 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 getPostData
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static function getPostData()
{
$files = array(
'name' => array(),
'type' => 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 prepareMessageBody
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function prepareMessageBody()
{
$attachments = $this->getSectionAttachments();
if ($attachments) {
$this->appendHeaderFields($this->contentInfoArray('multipart/mixed'));
- 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 generateOrderedSQLParts
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
final public function generateOrderedSQLParts()
{
$allParts = $this->getStatementStructure();
$orderedParts = [];
foreach ($allParts as $ti => $type) {
- 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 deleteDirectory
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static function deleteDirectory($dir, $silent = true)
{
try {
if (!@file_exists($dir)) {
return true;
- 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 prepareExportValue
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function prepareExportValue($data, $mode, $entry_id = null)
{
$modes = (object)$this->getExportModes();
// Make sure we have an array to work with:
- 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 processSystemParameters
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function processSystemParameters(Entry $entry)
{
if (!isset($this->dsParamPARAMOUTPUT)) {
return;
}
- 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 buildKeyDefinitionFromArray
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function buildKeyDefinitionFromArray($k, $options)
{
if (is_string($options)) {
$options = ['type' => $options];
} elseif (!is_array($options)) {
- 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"