Showing 889 of 1,089 total issues
Function encodeByteStream
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0)
{
if ($maxLineLength > 76 || $maxLineLength <= 0) {
$maxLineLength = 76;
}
- 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 __construct
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($search, $replace)
{
$this->_search = $search;
$this->_index = array();
$this->_tree = 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
Method smarty_modifiercompiler_escape
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
function smarty_modifiercompiler_escape($params, $compiler)
{
static $_double_encode = null;
if ($_double_encode === null) {
$_double_encode = version_compare(PHP_VERSION, '5.2.3', '>=');
Method compile
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compile($args, $compiler)
{
$compiler->has_code = true;
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
File function.html_select_time.php
has 285 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Smarty plugin
*
* @package Smarty
Method compileTemplate
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compileTemplate(Smarty_Internal_Template $template, $nocache = false)
{
if (empty($template->properties['nocache_hash'])) {
$template->properties['nocache_hash'] = $this->nocache_hash;
} else {
Swift_Signers_DomainKeySigner
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class Swift_Signers_DomainKeySigner implements Swift_Signers_HeaderSigner
{
/**
* PrivateKey
*
File share.class.php
has 284 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
class Share Extends Base {
protected $table = 'shares';
Method smarty_modifier_debug_print_var
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
function smarty_modifier_debug_print_var ($var, $depth = 0, $length = 40)
{
$_replace = array("\n" => '<i>\n</i>',
"\r" => '<i>\r</i>',
"\t" => '<i>\t</i>'
Method compile
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compile($args, $compiler, $parameter)
{
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
// nocache option
File function.html_select_date.php
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Smarty plugin
*
* @package Smarty
Method compile
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compile($args, $compiler, $parameter)
{
$_index = preg_split("/\]\[/",substr($parameter, 1, strlen($parameter)-2));
$compiled_ref = ' ';
$variable = trim($_index[0], "'");
Function smarty_function_cycle
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function smarty_function_cycle($params, $template)
{
static $cycle_vars;
$name = (empty($params['name'])) ? 'default' : $params['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_block_textformat
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function smarty_block_textformat($params, $content, $template, &$repeat)
{
if (is_null($content)) {
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 smarty_modifier_capitalize
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function smarty_modifier_capitalize($string, $uc_digits = false, $lc_rest = false)
{
if (Smarty::$_MBSTRING) {
if ($lc_rest) {
// uppercase (including hyphenated words)
- 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 compile
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function compile($args, $compiler)
{
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
- 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 createTemplate
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null, $do_clone = true)
{
if (!empty($cache_id) && (is_object($cache_id) || is_array($cache_id))) {
$parent = $cache_id;
$cache_id = null;
- 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 compile
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function compile($args, $compiler, $parameter)
{
// the following must be assigned at runtime because it will be overwritten in Smarty_Internal_Compile_Append
$this->required_attributes = array('var', 'value');
$this->shorttag_order = array('var', 'value');
- 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 getNotificatorInstance
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function getNotificatorInstance($notificator, $data){
$class = null;
$file = null;
if (is_array($notificator)){
- 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 encodeString
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0)
{
if ($maxLineLength > 76 || $maxLineLength <= 0) {
$maxLineLength = 76;
}
- 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"