Showing 714 of 844 total issues
Method processRawFieldData
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function processRawFieldData($data, &$status, &$message = null, $simulate = false, $entry_id = null)
Method processRawFieldData
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function processRawFieldData($data, &$status, &$message = null, $simulate = false, $entry_id = null)
Method appendFormattedElement
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function appendFormattedElement(XMLElement &$wrapper, $data, $encode = false, $mode = null, $entry_id = null)
Method replaceFieldToken
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function replaceFieldToken($needle, $haystack, $default = null, $discard_field_name = true, $collapse = true)
Method appendFormattedElement
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function appendFormattedElement(XMLElement &$wrapper, $data, $encode = false, $mode = null, $entry_id = null)
Method processRawFieldData
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function processRawFieldData($data, &$status, &$message = null, $simulate = false, $entry_id = null)
Method appendFormattedElement
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function appendFormattedElement(XMLElement &$wrapper, $data, $encode = false, $mode = null, $entry_id = null)
Method processSendMailFilter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function processSendMailFilter(XMLElement $result, array $send_email, array &$fields, Section $section, Entry $entry)
Method processRawFieldData
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function processRawFieldData($data, &$status, &$message = null, $simulate = false, $entry_id = null)
Method processRawFieldData
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function processRawFieldData($data, &$status, &$message = null, $simulate = false, $entry_id = null)
Method throwCustomError
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function throwCustomError($message, $heading = 'Symphony Fatal Error', $status = Page::HTTP_STATUS_ERROR, $template = 'generic', array $additional = array())
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($success, PDOStatement $stm, DatabaseQuery $query, array $page = [], $includeTypes = false)
Method pushToLog
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function pushToLog($message, $type = E_NOTICE, $writeToLog = false, $addbreak = true, $append = false)
Method fetch
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function fetch($include_types = true, array $select = array(), array $where = array(), $order_by = null, $hierarchical = false)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($message, $heading = 'Symphony Fatal Error', $template = 'generic', array $additional = array(), $status = Page::HTTP_STATUS_ERROR)
Method __appendAuthorFilter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __appendAuthorFilter(&$wrapper, $h4_label, $name, $value = null, $templateOnly = true)
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function initialize(HTMLPage $object, &$result, &$sort, &$order, array $params = array())
Function viewReady
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function viewReady()
{
$h2 = new XMLElement('h2', __('Updating Symphony'));
$p = new XMLElement('p', __('This script will update your existing Symphony installation to version %s.', array('<code>' . $this->params['version'] . '</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
Function validateRequest
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function validateRequest($silent = false)
{
// Only care if we have a POST request.
if (count($_POST) > 0) {
if (!self::validateToken($_POST["xsrf"])) {
- 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 Table
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function Table(XMLElement $header = null, XMLElement $footer = null, XMLElement $body = null, $class = null, $id = null, Array $attributes = null)
{
General::ensureType(array(
'class' => array('var' => $class, 'type' => 'string', 'optional' => true),
'id' => array('var' => $id, 'type' => 'string', 'optional' => 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"