Showing 889 of 1,089 total issues
Function smarty_modifiercompiler_escape
has a Cognitive Complexity of 18 (exceeds 5 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', '>=');
- 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 yy_is_expected_token
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function yy_is_expected_token($token)
{
if ($token === 0) {
return true; // 0 is not part of this
}
- 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 yy_is_expected_token
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function yy_is_expected_token($token)
{
if ($token === 0) {
return true; // 0 is not part of this
}
- 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_block_textformat
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
function smarty_block_textformat($params, $content, $template, &$repeat)
{
if (is_null($content)) {
return;
}
Method compile
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compile($args, $compiler, $parameter, $tag)
{
if (!isset($tag[5]) || substr($tag,-5) != 'close') {
// opening tag of block plugin
// check and get attributes
Method doAnchors
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function doAnchors($text) {
#
# Turn Markdown link shortcuts into XHTML <a> tags.
#
if ($this->in_anchor) return $text;
Method debug
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function debug($message)
{
$message = bin2hex($message);
$messageId = substr($message, 16, 8);
echo substr($message, 0, 16) . " NTLMSSP Signature<br />\n";
Method doAnchors
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function doAnchors($text) {
#
# Turn Markdown link shortcuts into XHTML <a> tags.
#
if ($this->in_anchor) return $text;
Block
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class Block extends Base {
protected $table = 'blocks';
/**
* Specific method to fetch the latest block found
Method __construct
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(Smarty_Internal_Template $_template)
{
$this->compile_id = $_template->compile_id;
$this->cache_id = $_template->cache_id;
$this->source = $_template->source;
Method yy_is_expected_token
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function yy_is_expected_token($token)
{
if ($token === 0) {
return true; // 0 is not part of this
}
Method yy_is_expected_token
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function yy_is_expected_token($token)
{
if ($token === 0) {
return true; // 0 is not part of this
}
Method getPrice
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getPrice() {
$aData = $this->getApi($this->config['price']['url'], $this->config['price']['target']);
$strBase = $this->config['currency'];
$strQuote = $this->config['price']['currency'];
// Check the API type for configured URL
Method __construct
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($config, &$memcache, $request='') {
$this->cache = $memcache;
// set our config options
$userORip = $_SERVER['REMOTE_ADDR'].@$_SERVER['HTTP_USER_AGENT'];
// prep stuff we need to check this request
Method streamToMime
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function streamToMime(Swift_OutputByteStream $fromStream, Swift_Message $message)
{
$bufferLength = 78;
$headerData = '';
Function smarty_modifier_date_format
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function smarty_modifier_date_format($string, $format=null, $default_date='', $formatter='auto')
{
if ($format === null) {
$format = Smarty::$_DATE_FORMAT;
}
- 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 run_0010
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function run_0010() {
// Ugly but haven't found a better way
global $setting, $config, $statistics, $block, $mysqli;
// Version information
- 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_truncate
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function smarty_modifier_truncate($string, $length = 80, $etc = '...', $break_words = false, $middle = false)
{
if ($length == 0)
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 compile
has a Cognitive Complexity of 17 (exceeds 5 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], "'");
- 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 17 (exceeds 5 allowed). Consider refactoring. Open
public function compile($args, $compiler, $parameter, $tag, $method)
{
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
if ($_attr['nocache'] === 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"