Showing 714 of 844 total issues
Method buildDSRetrievalSQL
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function buildDSRetrievalSQL($data, &$joins, &$where, $andOperation = false)
{
if (Symphony::Log()) {
Symphony::Log()->pushDeprecateWarningToLog(
get_called_class() . '::buildDSRetrievalSQL()',
Function filter
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function filter($field, array $values, $operator = 'or')
{
General::ensureType([
'operator' => ['var' => $operator, 'type' => 'string'],
]);
- 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 __viewNew
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function __viewNew()
{
$this->setPageType('form');
$this->setTitle(__('%1$s – %2$s', array(__('Sections'), __('Symphony'))));
$this->appendSubheading(__('Untitled'));
- 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
ExtensionManager
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
class ExtensionManager implements FileResource
{
/**
* An array of all the objects that the Manager is responsible for.
* Defaults to an empty array.
FieldTagList
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
class FieldTagList extends Field implements ExportableField, ImportableField
{
public function __construct()
{
parent::__construct();
Symphony
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class Symphony implements Singleton
{
/**
* An instance of the Symphony class, either `Administration` or `Frontend`.
* @var Symphony
Method view
has 94 lines of code (exceeds 25 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()) {
Function listAll
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public static function listAll()
{
$result = array();
$structure = General::listStructure(DATASOURCES, '/data.[\\w-]+.php/', false, 'ASC', DATASOURCES);
- 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 fetch
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public static function fetch(array $select = array(), array $where = array(), $order_by = null)
{
$extensions = self::listAll();
$data = 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 canAccessPage
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function canAccessPage()
{
$nav = $this->getNavigationArray();
$page = '/' . trim(getCurrentPage(), '/') . '/';
- 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 listAll
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public static function listAll()
{
$result = array();
$structure = General::listStructure(EVENTS, '/event.[\\w-]+.php/', false, 'ASC', EVENTS);
- 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
FieldCheckbox
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class FieldCheckbox extends Field implements ExportableField, ImportableField
{
public function __construct()
{
parent::__construct();
Function upgrade
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function upgrade()
{
// Upgrade DB settings
$db = Symphony::Configuration()->get('database');
$db['driver'] = 'mysql';
- 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 sort
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function sort($field, $direction = 'ASC')
{
General::ensureType([
'field' => ['var' => $field, 'type' => 'string'],
'direction' => ['var' => $direction, 'type' => 'string'],
- 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 about
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public static function about($name, $rawXML = false)
{
// See if the extension has the new meta format
if (file_exists(self::__getClassPath($name) . '/extension.meta.xml')) {
try {
- 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 exec
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function exec($force_connection_method = null)
{
if ($force_connection_method !== self::FORCE_SOCKET && self::isCurlAvailable()) {
$ch = curl_init();
- 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 setAssociatedEntryCounts
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function setAssociatedEntryCounts(XMLElement &$xEntry, Entry $entry)
{
$associated_entry_counts = $entry->fetchAllAssociatedEntryCounts($this->_associated_sections);
if (!empty($associated_entry_counts)) {
- 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 __viewNew
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __viewNew()
{
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>')),
Method view
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function view()
{
$this->setPageType('form');
$this->setTitle(__('%1$s – %2$s', array(__('Preferences'), __('Symphony'))));
$this->addElementToHead(new XMLElement('link', null, array(
File class.installerpage.php
has 313 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @package content
*/