Showing 714 of 844 total issues
Function appendNavigation
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
public function appendNavigation()
{
$nav = $this->getNavigationArray();
/**
- 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
File class.pagemanager.php
has 441 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @package toolkit
*/
Function __viewEdit
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
public function __viewEdit()
{
$this->setPageType('form');
$fields = array("title"=>null, "handle"=>null, "parent"=>null, "params"=>null, "type"=>null, "data_sources"=>null);
$existing = $fields;
- 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 collapsible
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
objects.each(function collapsible(index) {
var object = $(this),
storage = settings.storage + '.' + index + '.collapsed';
var getDuration = function (duration) {
Method __viewIndex
has 162 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __viewIndex()
{
$canonical_link = '/system/extensions/';
$this->setPageType('table');
$this->setTitle(__('%1$s – %2$s', array(__('Extensions'), __('Symphony'))));
Function processFilters
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function processFilters(&$entryQuery)
{
if (!is_array($this->dsParamFILTERS) || empty($this->dsParamFILTERS)) {
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 __viewEdit
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function __viewEdit()
{
if (!$section_id = SectionManager::fetchIDFromHandle($this->_context['section_handle'])) {
Administration::instance()->throwCustomError(
__('The Section, %s, could not be found.', array('<code>' . $this->_context['section_handle'] . '</code>')),
- 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
Method __viewIndex
has 159 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __viewIndex($resource_type)
{
$manager = ResourceManager::getManagerFromType($resource_type);
$friendly_resource = ($resource_type === ResourceManager::RESOURCE_TYPE_EVENT) ? __('Event') : __('DataSource');
$context = Administration::instance()->getPageCallback();
Function fetch
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public static function fetch($type, array $select = array(), array $where = array(), $order_by = null)
{
$manager = self::getManagerFromType($type);
if (!isset($manager)) {
- 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 processEntry
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public function processEntry(Entry $entry)
{
$data = $entry->getData();
$xEntry = new XMLElement('entry');
- 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 symphonyNotify
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.symphonyNotify = function(options) {
var objects = this,
settings = {
items: 'p.notice',
storage: 'symphony.notify.' + Symphony.Context.get('root').replace('http://', '')
Function Symphony
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
var Symphony = (function($, crossroads) {
'use strict';
// Internal Symphony storage
var Storage = {
- 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 __viewEdit
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
public function __viewEdit()
{
$section_id = $this->_context['id'];
$section = (new SectionManager)->select()->section($section_id)->execute()->next();
- 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
Method generate
has 150 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function generate(array &$param_pool = null)
{
$result = new XMLElement($this->dsParamROOTELEMENT);
$this->_param_pool = $param_pool;
$requiresPagination = (!isset($this->dsParamPAGINATERESULTS) ||
Function delete
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public static function delete($entries, $section_id = null)
{
$needs_data = true;
if (!is_array($entries)) {
- 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 view
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function view()
{
if (isset($this->_context['token']) && $this->_context['action'] === 'reset-password') {
if (Administration::instance()->loginFromToken($this->_context['token'])) {
if (Administration::instance()->isLoggedIn()) {
- 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
File class.emailgateway.php
has 410 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @package toolkit
*/
Method buildSingleWhereClauseFromArray
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
final public function buildSingleWhereClauseFromArray($k, $c)
{
$op = '=';
if (is_object($c)) {
if (!($c instanceof DatabaseSubQuery)) {
Method __formAction
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __formAction()
{
$fields = $_POST['fields'];
$this->_errors = array();
$providers = Symphony::ExtensionManager()->getProvidersOf(iProvider::EVENT);
Function Calendar
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Open
Symphony.Interface.Calendar = function() {
var template = '<div class="calendar"><nav><a class="clndr-previous-button">previous</a><div class="switch"><ul class="months"><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li></ul><ul class="years"><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li></ul></div><a class="clndr-next-button">next</a></nav><table><thead><tr><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td></tr></thead><tbody><tr><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td></tr><tr><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td></tr><tr><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td></tr><tr><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td></tr><tr><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td></tr><tr><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td><td><span></span></td></tr></tbody></table></div>',
context, calendar, storage, format, datetime, clndr;
var init = function(element) {