Showing 889 of 1,089 total issues
Method createNTLMv2Hash
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function createNTLMv2Hash($password, $username, $domain, $challenge, $targetInfo, $timestamp, $client)
Method smarty_function_html_options_optgroup
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function smarty_function_html_options_optgroup($key, $values, $selected, $id, $class, &$idx)
Function md5_cmn
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function md5_cmn(q, a, b, x, s, t) {
Method smarty_function_html_options_optoutput
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function smarty_function_html_options_optoutput($key, $value, $selected, $id, $class, &$idx)
Function run_db_upgrade
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function run_db_upgrade($db_version_now) {
// Dirty, but need it here
global $setting;
// Drop caches from our settings for live data
- 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 save
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
abstract protected function save($id, $name, $cache_id, $compile_id, $exp_time, $content);
Function addPluginsDir
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function addPluginsDir($plugins_dir)
{
// make sure we're dealing with an array
$this->plugins_dir = (array) $this->plugins_dir;
- 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 populate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template = null)
{
$uid = '';
$sources = array();
$components = explode('|', $source->name);
- 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 smarty_modifiercompiler_wordwrap
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function smarty_modifiercompiler_wordwrap($params, $compiler)
{
if (!isset($params[1])) {
$params[1] = 80;
}
- 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 doCompile
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function doCompile($_content)
{
/* here is where the compiling takes place. Smarty
tags in the templates are replaces with PHP code,
then written to compiled files. */
- 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 __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(Smarty_Resource $handler, Smarty $smarty, $resource, $type, $name, $unique_resource)
Method fetch
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
abstract protected function fetch($id, $name, $cache_id, $compile_id, &$content, &$mtime);
Function append_subtree
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function append_subtree(_smarty_parsetree $subtree)
{
$last_subtree = count($this->subtrees) - 1;
if ($last_subtree >= 0 && $this->subtrees[$last_subtree] instanceof _smarty_tag && $this->subtrees[$last_subtree]->saved_block_nesting < $this->parser->block_nesting_level) {
if ($subtree instanceof _smarty_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
Avoid deeply nested control flow statements. Open
if ($mod_array[0][$i] != ':') {
$modifierlist[$key][] = $mod_array[0][$i];
}
Function compileConfigSource
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function compileConfigSource()
{
// compile template
if (!is_object($this->compiler_object)) {
// load compiler
- 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 __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(Smarty_Resource $handler, Smarty $smarty, $resource, $type, $name, $unique_resource)
Function offsetSet
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function offsetSet($offset, $value)
{
if ($offset === null) {
if (isset($value[0])) {
$x = ($value instanceof TP_yyToken) ?
- 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 to_smarty_php
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function to_smarty_php()
{
$code = '';
foreach ($this->subtrees as $subtree) {
if ($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 mustCompile
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function mustCompile()
{
if (!$this->source->exists) {
if ($this->parent instanceof Smarty_Internal_Template) {
$parent_resource = " in '$this->parent->template_resource}'";
- 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 offsetSet
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function offsetSet($offset, $value)
{
if ($offset === null) {
if (isset($value[0])) {
$x = ($value instanceof TPC_yyToken) ?
- 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"