Showing 889 of 1,089 total issues
Function __call
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function __call($method, $args)
{
foreach ($this->_handlers as $handler) {
if (in_array(strtolower($method),
array_map('strtolower', (array) $handler->exposeMixinMethods())
- 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 encodeWords
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function encodeWords(Swift_Mime_Header $header, $input, $usedLength = -1)
{
$value = '';
$tokens = $this->getEncodableWordTokens($input);
- 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 createPhrase
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function createPhrase(Swift_Mime_Header $header, $string, $charset, Swift_Mime_HeaderEncoder $encoder = null, $shorten = false)
{
// Treat token as exactly what was given
$phraseStr = $string;
// If it's not valid
- 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 exportToByteStream
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is)
{
if ($this->hasKey($nsKey, $itemKey)) {
$fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START);
if ($this->_quotes) {
- 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
Consider simplifying this complex logical expression. Open
if ((!$this->caching || $_template->has_nocache_code || $_template->source->recompiled) && !$no_output_filter && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) {
$_output = Smarty_Internal_Filter_Handler::runFilter('output', $_output, $_template);
}
Consider simplifying this complex logical expression. Open
if ((!($this->template->source->recompiled) || $this->forceNocache) && $this->template->caching && !$this->suppressNocacheProcessing &&
($this->nocache || $this->tag_nocache)
) {
$this->template->has_nocache_code = true;
$_output = addcslashes($content, '\'\\');
Consider simplifying this complex logical expression. Open
if ($this->mustCompile === null) {
$this->mustCompile = (!$this->source->uncompiled && ($this->smarty->force_compile || $this->source->recompiled || $this->compiled->timestamp === false ||
($this->smarty->compile_check && $this->compiled->timestamp < $this->source->timestamp)));
}
Consider simplifying this complex logical expression. Open
if ( @$_SESSION['AUTHENTICATED'] == true &&
!$this->isLocked($_SESSION['USERDATA']['id']) &&
$this->getUserIp($_SESSION['USERDATA']['id']) == $_SERVER['REMOTE_ADDR'] &&
( ! $this->config['protect_session_state'] ||
(
Method smarty_modifier_truncate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function smarty_modifier_truncate($string, $length = 80, $etc = '...', $break_words = false, $middle = false)
Method register_object
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function register_object($object, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array())
Method compileAllTemplates
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function compileAllTemplates($extension, $force_compile, $time_limit, $max_errors, Smarty $smarty)
Method clear
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function clear(Smarty $smarty, $resource_name, $cache_id, $compile_id, $exp_time)
Method compileAllConfig
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function compileAllConfig($extension, $force_compile, $time_limit, $max_errors, Smarty $smarty)
Method mutingErrorHandler
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext)
Method registerObject
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function registerObject($object_name, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array())
Method clear
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
abstract public function clear(Smarty $smarty, $resource_name, $cache_id, $compile_id, $exp_time);
Method registerPlugin
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function registerPlugin($type, $tag, $callback, $cacheable = true, $cache_attr = null)
Method clear
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function clear(Smarty $smarty, $resource_name, $cache_id, $compile_id, $exp_time)
Method callTagCompiler
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function callTagCompiler($tag, $args, $param1 = null, $param2 = null, $param3 = null)
Method createTemplate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null, $do_clone = true)